/* =========================================================
   Zima w Mieście — SP 356
   Paleta: noc zimowa (granat) → lód (błękit) → śnieg (biel)
   ========================================================= */
:root {
    --navy-900: #071a2e;
    --navy-800: #0d2b49;
    --navy-700: #13395c;
    --blue-600: #14679f;
    --blue-500: #1d84c6;
    --blue-400: #3aa6e0;
    --ice-300: #8ed6f2;
    --ice-200: #bfe9f9;
    --frost-50: #f3f9fd;
    --frost-100: #e6f2fa;
    --white: #ffffff;
    --ink: #122438;
    --ink-soft: #34506b;
    --muted: #61798f;
    --line: #d8e7f2;
    --accent: #d7263d;
    --accent-soft: #fdeaed;
    --green: #35915a;
    --orange: #dd7d1a;
    --violet: #6c5bd4;
    --shadow-sm: 0 1px 2px rgba(10, 39, 66, .06), 0 1px 3px rgba(10, 39, 66, .08);
    --shadow-md: 0 10px 30px -12px rgba(10, 39, 66, .25);
    --shadow-lg: 0 30px 60px -30px rgba(7, 26, 46, .45);
    --radius: 16px;
    --radius-sm: 10px;
    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--frost-50);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--ink); }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--navy-800); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.t-right { text-align: right; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-600); cursor: pointer; }
.link:hover { text-decoration: underline; }
.link--danger { color: var(--accent); }
.inline-form { display: inline; }
code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: .87em; background: var(--frost-100); color: var(--blue-600);
    padding: .12em .4em; border-radius: 5px;
}

/* ---------- przyciski ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .75rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: .95rem; cursor: pointer; text-align: center;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
    color: #fff; box-shadow: 0 10px 24px -12px rgba(29, 132, 198, .9);
}
.btn--primary:hover { color: #fff; background: linear-gradient(135deg, var(--blue-400), var(--blue-500)); }
.btn--ghost {
    background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35);
    backdrop-filter: blur(6px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.btn--outline { background: #fff; color: var(--blue-600); border-color: var(--line); }
.btn--outline:hover { border-color: var(--blue-400); color: var(--blue-600); box-shadow: var(--shadow-sm); }
.btn--block { display: flex; width: 100%; }
.btn--sm { padding: .5rem .95rem; font-size: .85rem; }

/* ---------- nagłówek ---------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(216, 231, 242, .8);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: .85rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-logo {
    width: 46px; height: 46px; border-radius: 12px; background: #fff;
    display: grid; place-items: center; box-shadow: var(--shadow-sm); overflow: hidden; flex: none;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: .95rem; letter-spacing: -.01em; }
.brand-text span { font-size: .78rem; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.nav-link {
    padding: .55rem .9rem; border-radius: 999px; font-size: .9rem; font-weight: 550;
    color: var(--ink-soft); transition: background .18s ease, color .18s ease;
}
.nav-link:hover { background: var(--frost-100); color: var(--blue-600); }
.nav-link.is-active { background: var(--navy-800); color: #fff; }
.nav-link--admin { border: 1px solid var(--line); margin-left: .4rem; }

.nav-toggle {
    display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 11px 10px;
    flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy-800); border-radius: 2px; }
.nav-toggle:not(.visually-hidden) + .main-nav { }

/* ---------- komunikaty ---------- */
.flash-wrap { padding-top: 1rem; }
.alert {
    border-radius: var(--radius-sm); padding: .85rem 1.1rem; margin-bottom: .75rem;
    font-size: .93rem; border: 1px solid var(--line); background: #fff;
}
.alert--success { background: #eefaf1; border-color: #bfe6cb; color: #1f6b3a; }
.alert--error { background: var(--accent-soft); border-color: #f5c2c9; color: #9c1526; }
.alert--warning { background: #fff7e8; border-color: #f5dcae; color: #8a5a10; }
.alert--info { background: var(--frost-100); border-color: var(--ice-200); color: var(--navy-700); }

/* ---------- hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(1200px 420px at 15% -10%, rgba(58, 166, 224, .35), transparent 60%),
        radial-gradient(900px 380px at 85% 0%, rgba(142, 214, 242, .25), transparent 55%),
        linear-gradient(165deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--blue-600) 130%);
    color: #fff;
    padding: 3.5rem 0 0;
}
.hero-snow {
    position: absolute; inset: 0; pointer-events: none; opacity: .55;
    background-image:
        radial-gradient(2px 2px at 20% 30%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 70% 20%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 40% 70%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 85% 60%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 10% 80%, #fff 50%, transparent 51%),
        radial-gradient(2px 2px at 55% 45%, #fff 50%, transparent 51%);
    background-size: 420px 320px, 380px 300px, 460px 340px, 520px 380px, 400px 300px, 600px 420px;
    animation: snowfall 26s linear infinite;
}
@keyframes snowfall {
    from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
    to { background-position: 60px 320px, -50px 300px, 40px 340px, -40px 380px, 30px 300px, -60px 420px; }
}
.hero-inner {
    position: relative; display: grid; grid-template-columns: 1.35fr .65fr; gap: 3rem;
    align-items: center; padding-bottom: 3rem;
}
.hero-copy { max-width: 44rem; }
.hero-badge {
    display: inline-block; padding: .35rem .9rem; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
    font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ice-200); margin-bottom: 1.1rem;
}
.hero-title {
    font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; letter-spacing: -.035em;
    color: #fff; margin-bottom: .6rem; text-wrap: balance;
}
.hero-lead {
    font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--ice-200);
    max-width: 38rem; margin-bottom: 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.4rem; }
.hero-note { font-size: .82rem; color: rgba(191, 233, 249, .8); margin: 0; }

.hero-card {
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 22px; padding: 1.6rem; text-align: center;
    backdrop-filter: blur(10px); box-shadow: var(--shadow-lg);
}
.hero-card-logo {
    width: 130px; height: 130px; margin: 0 auto 1rem; background: #fff;
    border-radius: 20px; display: grid; place-items: center; overflow: hidden;
    box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .6);
}
.hero-card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.hero-card-title { font-weight: 700; font-size: 1rem; color: #fff; margin-bottom: .2rem; }
.hero-card-sub { font-size: .8rem; color: rgba(191, 233, 249, .85); margin-bottom: 1rem; }
.hero-card-stats { display: flex; justify-content: center; gap: 1.6rem; margin: 0; }
.hero-card-stats dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(191, 233, 249, .75); }
.hero-card-stats dd { margin: .15rem 0 0; font-size: 1.5rem; font-weight: 750; color: #fff; }

.hero-banner { position: relative; padding-bottom: 0; }
.hero-banner img {
    width: 100%; border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, .5);
}

/* ---------- pasek tablic ---------- */
.boards-strip { background: #fff; border-bottom: 1px solid var(--line); }
.boards-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .9rem 0; }
.boards-label { font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.chip {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line);
    background: var(--frost-50); color: var(--ink-soft); font-size: .85rem; font-weight: 550;
    transition: all .18s ease;
}
.chip:hover { border-color: var(--blue-400); color: var(--blue-600); background: #fff; }
.chip.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip--sm { font-size: .78rem; padding: .28rem .7rem; }
.chip-count {
    font-size: .72rem; font-weight: 700; background: rgba(18, 36, 56, .08);
    padding: .05rem .4rem; border-radius: 999px; min-width: 1.4rem; text-align: center;
}
.chip.is-active .chip-count { background: rgba(255, 255, 255, .22); }

/* ---------- sekcja / karty ---------- */
.section { padding: 3.5rem 0 4.5rem; }
.section-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
.section-head { margin-bottom: 1.75rem; max-width: 46rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .4rem; }
.section-head p { color: var(--muted); margin: 0; }

.cards { display: grid; gap: 1.1rem; }
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--ice-300); }
.card--pinned { border-left: 4px solid var(--accent); }
.card-media { margin: -1.4rem -1.5rem 1.1rem; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card-media img { width: 100%; height: 210px; object-fit: cover; }
.card-body { min-width: 0; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: .6rem; }
.card-meta time { font-size: .78rem; color: var(--muted); }
.card-title { font-size: 1.15rem; margin-bottom: .4rem; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--blue-600); }
.card-excerpt { color: var(--ink-soft); font-size: .93rem; margin-bottom: .9rem; }
.card-link { font-weight: 600; font-size: .88rem; }

.tag {
    display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 6px;
    font-size: .72rem; font-weight: 650; letter-spacing: .02em;
    background: var(--frost-100); color: var(--blue-600); text-transform: uppercase;
}
.tag--blue { background: #e4f1fb; color: var(--blue-600); }
.tag--green { background: #e7f6ec; color: var(--green); }
.tag--orange { background: #fdf1e3; color: var(--orange); }
.tag--red { background: var(--accent-soft); color: var(--accent); }
.tag--violet { background: #efedfd; color: var(--violet); }
.tag--pin { background: var(--accent); color: #fff; }

/* ---------- sidebar ---------- */
.sidebar { display: grid; gap: 1rem; position: sticky; top: 96px; }
.panel {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.35rem 1.4rem; box-shadow: var(--shadow-sm);
}
.panel--contact { background: linear-gradient(160deg, #fff, var(--frost-100)); }
.panel-title { font-size: .95rem; font-weight: 700; margin-bottom: .7rem; }
.panel-text { font-size: .88rem; color: var(--ink-soft); }
.panel-list { list-style: none; padding: 0; margin: 0; font-size: .87rem; color: var(--ink-soft); }
.panel-list li { padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.panel-list li:last-child { border-bottom: 0; }
.panel-list--links a { display: flex; align-items: center; gap: .55rem; color: var(--ink-soft); }
.panel-list--links a:hover { color: var(--blue-600); }
.panel-count { margin-left: auto; font-size: .75rem; color: var(--muted); font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue-500); display: inline-block; flex: none; }
.dot--blue { background: var(--blue-500); }
.dot--green { background: var(--green); }
.dot--orange { background: var(--orange); }
.dot--red { background: var(--accent); }
.dot--violet { background: var(--violet); }

.empty-state {
    background: #fff; border: 1px dashed var(--ice-300); border-radius: var(--radius);
    padding: 3rem 1.5rem; text-align: center;
}
.empty-icon { font-size: 2.5rem; margin-bottom: .5rem; color: var(--ice-300); }
.empty-state--sm { padding: 1.8rem 1.2rem; }
.empty-state--sm h3 { margin-bottom: .4rem; }

/* Treść nigdy nie wychodzi poza karty/kolumny — długie adresy i wyrazy się łamią. */
.prose, .rich-content, .board-intro, .card-title, .card-excerpt,
.page-hero-lead, .panel-text, .table td, .admin-nav-link {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.prose p, .prose li, .rich-content p, .rich-content li { hyphens: auto; }

/* ---------- podstrony ---------- */
.page-hero {
    background: linear-gradient(160deg, var(--navy-800), var(--blue-600));
    color: #fff; padding: 3rem 0 2.6rem;
}
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: .4rem; text-wrap: balance; }
.breadcrumb { font-size: .82rem; color: rgba(191, 233, 249, .85); margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255, 255, 255, .9); }
.breadcrumb span { margin: 0 .35rem; opacity: .7; }
.page-hero .card-meta { margin-bottom: .7rem; }
.page-hero--error { text-align: center; }
.error-code { font-size: clamp(3.5rem, 10vw, 6rem); font-weight: 850; line-height: 1; opacity: .35; margin: 0; }
.error-text { color: var(--ice-200); margin: 0 0 1.5rem; }

.prose-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; }
.prose {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem 2.2rem; box-shadow: var(--shadow-sm);
    color: var(--ink-soft); font-size: .96rem;
}
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.6rem; }
.prose p:first-child { margin-top: 0; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: .3rem; }
.prose strong { color: var(--ink); }
.prose-figure { margin: 0 0 1.5rem; border-radius: var(--radius-sm); overflow: hidden; }
.prose-updated { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.prose--compact { padding: 1.1rem 1.2rem; font-size: .9rem; }
.prose-aside { display: grid; gap: 1rem; }

/* ---------- stopka ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .78); padding: 3rem 0 1.5rem; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1fr; gap: 2.5rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.footer-logo { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; margin-bottom: .9rem; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: .35rem; }
.footer-muted { font-size: .85rem; color: rgba(255, 255, 255, .6); max-width: 32rem; }
.footer-heading { color: #fff; font-weight: 650; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .8rem; }
.footer-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.footer-list li { padding: .22rem 0; }
.footer-list--plain li { color: rgba(255, 255, 255, .65); }
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer a:hover { color: #fff; }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
    padding-top: 1.25rem; font-size: .8rem; color: rgba(255, 255, 255, .55);
}
.footer-bottom p { margin: 0; }

/* =========================================================
   PANEL ADMINISTRACYJNY
   ========================================================= */
.admin-body { background: var(--frost-50); }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }

.admin-sidebar {
    background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
    padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: 1.5rem;
    position: sticky; top: 0; height: 100vh;
}
.admin-brand { display: flex; align-items: center; gap: .7rem; color: #fff; padding: .3rem .4rem; }
.admin-brand img { width: 38px; height: 38px; border-radius: 10px; background: #fff; padding: 3px; object-fit: contain; }
.admin-brand strong { display: block; font-size: .95rem; letter-spacing: .02em; }
.admin-brand small { font-size: .7rem; color: var(--ice-300); text-transform: uppercase; letter-spacing: .12em; }
.admin-nav { display: grid; gap: .2rem; }
.admin-nav-link {
    display: flex; align-items: center; gap: .65rem; padding: .6rem .7rem; border-radius: 10px;
    color: rgba(255, 255, 255, .75); font-size: .9rem; font-weight: 500;
}
.admin-nav-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-nav-link.is-active { background: rgba(58, 166, 224, .18); color: #fff; box-shadow: inset 0 0 0 1px rgba(142, 214, 242, .35); }
.admin-nav-icon { width: 1.15rem; text-align: center; opacity: .9; }
.admin-sidebar-foot { margin-top: auto; }
.admin-link-muted { color: rgba(255, 255, 255, .5); font-size: .82rem; }
.admin-link-muted:hover { color: #fff; }

.admin-main { padding: 1.6rem 2rem 3rem; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.admin-overline { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .15rem; }
.admin-title { font-size: 1.6rem; margin: 0; }
.admin-user { display: flex; align-items: center; gap: .7rem; }
.admin-user-name { font-weight: 600; font-size: .9rem; }
.admin-user-role { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .5rem; }
.admin-content { display: grid; gap: 1.25rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.stat-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 0 0 .35rem; }
.stat-value { font-size: 1.9rem; font-weight: 780; margin: 0; letter-spacing: -.03em; color: var(--navy-800); }
.stat-sub { font-size: .78rem; color: var(--muted); margin: .25rem 0 0; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.admin-grid--aside { grid-template-columns: minmax(0, 1fr) 340px; }
.card-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.25rem 1.35rem; box-shadow: var(--shadow-sm); }
.card-panel--narrow { max-width: 640px; }
.card-panel--wide { max-width: 980px; }
.card-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-panel-head h2 { font-size: 1.08rem; margin: 0; }
.subhead { font-size: .95rem; margin: 1.4rem 0 .7rem; }
.stack { display: grid; gap: 1rem; }

.table { width: 100%; border-collapse: collapse; font-size: .89rem; }
.table th {
    text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    color: var(--muted); padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: .7rem .6rem; border-bottom: 1px solid var(--frost-100); vertical-align: top; }
.table tbody tr:hover { background: #fbfdff; }
.table--compact td, .table--compact th { padding: .45rem .5rem; font-size: .84rem; }
.row-expand td { border-bottom: 1px solid var(--line); padding-top: 0; }
.row-expand details summary { cursor: pointer; font-size: .8rem; color: var(--blue-600); }
.pill {
    display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 650;
    border: 1px solid transparent; background: var(--frost-100); color: var(--ink-soft);
}
.pill--ok { background: #e7f6ec; color: #23744a; border-color: #c6e8d3; }
.pill--draft { background: #f1f4f7; color: #5f7285; border-color: #e0e7ed; }
.pill--bad { background: var(--accent-soft); color: #a01a2b; border-color: #f4c6cd; }
button.pill { cursor: pointer; }

.filters { display: flex; flex-wrap: wrap; gap: .65rem; align-items: flex-end; margin-bottom: 1rem; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; }
.quick {
    display: flex; align-items: center; gap: .6rem; padding: .9rem 1rem; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--frost-50); color: var(--ink); font-weight: 550; font-size: .9rem;
}
.quick:hover { border-color: var(--blue-400); background: #fff; color: var(--blue-600); }
.quick span { font-size: 1.1rem; }

.feed-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }
.feed-list li { display: flex; gap: .65rem; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-400); margin-top: .5rem; flex: none; }
.feed-text { margin: 0; font-size: .87rem; }
.feed-sub { margin: .1rem 0 0; font-size: .8rem; color: var(--muted); }
.feed-time { margin: .1rem 0 0; font-size: .74rem; color: var(--muted); }

.kv { display: grid; gap: .6rem; margin: 0 0 1rem; }
.kv > div { display: flex; gap: 1rem; font-size: .9rem; }
.kv dt { min-width: 110px; color: var(--muted); margin: 0; }
.kv dd { margin: 0; }

/* ---------- formularze ---------- */
.form { display: grid; gap: .95rem; }
.form--inline { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; }
.form--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; align-items: end; padding: .8rem 0 .4rem; }
.field { display: grid; gap: .3rem; min-width: 0; }
.field--grow { flex: 1 1 220px; }
.field--inline { min-width: 150px; }
.field-label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.field-hint { font-size: .75rem; color: var(--muted); }
.input {
    width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 9px;
    font: inherit; font-size: .9rem; background: #fff; color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(58, 166, 224, .18); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.input--file { padding: .45rem; background: var(--frost-50); }
.field-row { display: flex; gap: .9rem; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 180px; }
.checkbox { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--ink-soft); cursor: pointer; }
.checkbox input { width: 17px; height: 17px; accent-color: var(--blue-500); }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; padding-top: .4rem; }
.form-actions--sticky { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(243, 249, 253, .4), var(--frost-50)); padding: 1rem 0; }
.current-image { display: flex; align-items: center; gap: .8rem; }
.current-image img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

/* ---------- logowanie ---------- */
.auth-body {
    min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
    background:
        radial-gradient(900px 400px at 10% 0%, rgba(58, 166, 224, .3), transparent 60%),
        linear-gradient(165deg, var(--navy-900), var(--navy-800) 60%, var(--blue-600));
}
.auth-card {
    width: min(430px, 100%); background: #fff; border-radius: 20px; padding: 2rem 2rem 1.6rem;
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.auth-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; }
.auth-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; background: var(--frost-50); padding: 3px; }
.auth-brand strong { display: block; font-size: .92rem; }
.auth-brand span { font-size: .78rem; color: var(--muted); }
.auth-title { font-size: 1.4rem; margin-bottom: .3rem; }
.auth-sub { font-size: .87rem; color: var(--muted); margin-bottom: 1.3rem; }
.auth-footer { margin: 1.2rem 0 0; font-size: .85rem; text-align: center; }

/* ---------- responsywność ---------- */
@media (max-width: 1080px) {
    .section-grid, .prose-wrap { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .admin-grid, .admin-grid--aside { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .hero-card { max-width: 340px; }
    .admin-shell { grid-template-columns: minmax(0, 1fr); }
    .admin-sidebar { position: static; height: auto; flex-direction: column; }
    .admin-nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .admin-main { padding: 1.2rem 1rem 2.5rem; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        background: #fff; border-bottom: 1px solid var(--line); padding: .8rem 1rem 1.1rem;
        flex-direction: column; align-items: stretch; box-shadow: var(--shadow-md);
    }
    .main-nav.is-open { display: flex; }
    .nav-link { padding: .7rem .8rem; }
    .nav-link--admin { margin-left: 0; }
    .header-inner { position: relative; min-height: 66px; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .prose { padding: 1.4rem 1.2rem; }
    .section { padding: 2.5rem 0 3rem; }
    .hero { padding-top: 2.4rem; }
    .admin-topbar { flex-direction: column; }
}

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

/* atrybut hidden musi działać mimo display:flex w klasach */
[hidden] { display: none !important; }

/* ---------- Canva (panel) ---------- */
.canva-head { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.canva-head-main { display: flex; gap: 1rem; align-items: flex-start; }
.canva-logo {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center; font-weight: 700; font-size: 1.5rem; color: #fff;
    background: linear-gradient(135deg, #00c4cc 0%, #7d2ae8 100%);
    box-shadow: 0 8px 20px rgba(125, 42, 232, .28);
}
.canva-head-status .badge { font-size: .74rem; }
.badge--ok { background: #e3f6ec; color: #17734a; }
.badge--warn { background: #fdecd8; color: #8a4b00; }
.badge--muted { background: #eef3f8; color: #516479; }

.canva-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }
.canva-actions-right { display: flex; align-items: center; gap: .6rem; }
.canva-search { display: flex; align-items: center; gap: .5rem; flex: 1 1 320px; max-width: 520px; }
.canva-search .input { flex: 1 1 auto; }

.canva-grid {
    display: grid; gap: 1rem; margin-top: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.canva-card {
    border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
    background: #fff; display: flex; flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
}
.canva-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.canva-thumb { aspect-ratio: 4 / 3; background: #f1f6fb; display: grid; place-items: center; overflow: hidden; }
.canva-thumb img { width: 100%; height: 100%; object-fit: cover; }
.canva-thumb-empty { font-size: .78rem; color: #8598ab; }
.canva-card-title {
    font-size: .92rem; margin: .7rem .8rem .2rem; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.canva-card-meta { font-size: .76rem; color: var(--muted); margin: 0 .8rem .7rem; }
.canva-card-actions { display: flex; gap: .4rem; flex-wrap: wrap; padding: 0 .8rem .8rem; margin-top: auto; }
.canva-more { margin-top: 1.2rem; }

.canva-design-preview { display: flex; gap: 1rem; align-items: center; margin: 1rem 0 1.4rem; }
.canva-design-preview img { width: 190px; border-radius: 12px; border: 1px solid var(--line); }
.canva-design-preview h3 { margin: 0 0 .3rem; }

.canva-created { padding: .9rem 1rem; background: #f5f9fd; border-radius: 12px; margin: 1rem 0; }

.canva-hero-preview { display: flex; flex-direction: column; gap: .7rem; margin-top: .8rem; }
.canva-hero-preview img { width: 100%; max-width: 720px; border-radius: 12px; border: 1px solid var(--line); }

.canva-exports { display: grid; gap: .9rem; margin-top: 1rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.canva-export { margin: 0; }
.canva-export img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.canva-export figcaption { display: flex; flex-direction: column; font-size: .74rem; color: var(--muted); margin-top: .35rem; }
.canva-export figcaption strong { color: var(--ink); font-size: .8rem; }

/* okładki tablic */
.board-cover { margin: 0 0 1.4rem; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.board-cover img { width: 100%; max-height: 280px; object-fit: cover; display: block; }
.board-cover-thumb { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }

/* lista kontrolna konfiguracji Canva */
.checklist { margin: 1rem 0 1.2rem; border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; background: #f7fbfe; }
.checklist summary { cursor: pointer; font-weight: 600; font-size: .88rem; }
.checklist-steps { margin: .8rem 0 0; padding-left: 1.2rem; font-size: .86rem; line-height: 1.6; }
.checklist-steps li { margin-bottom: .5rem; }
.checklist-steps code { word-break: break-all; }

.canva-edit-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .6rem 0 .2rem; }

/* =========================================================
   Redesign strony głównej (2026-11-08)
   Baner z Canvy ma własną „ramę”, tekst siedzi w osobnym pasku
   pod nim — nic się nie nakłada i nic nie konkuruje z grafiką.
   ========================================================= */

/* --- 1. Masthead: baner jako główna grafika strony --- */
.masthead {
    background:
        radial-gradient(900px 320px at 50% -40%, rgba(58, 166, 224, .16), transparent 65%),
        linear-gradient(180deg, var(--frost-100) 0%, #fbfdff 100%);
    padding: 1.8rem 0 2rem;
    border-bottom: 1px solid var(--line);
}
.masthead-frame {
    margin: 0;
    padding: 8px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(216, 231, 242, .95);
    box-shadow: 0 26px 55px -30px rgba(7, 26, 46, .55);
}
.masthead-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

/* --- 3. Dopracowanie reszty strony --- */
.boards-strip {
    background: #fff;
    box-shadow: 0 10px 24px -22px rgba(7, 26, 46, .6);
    position: relative;
    z-index: 1;
}
.boards-inner { padding: 1rem 0; }
.chip { background: #fff; }
.chip:hover { transform: translateY(-1px); }

.section { padding: 3.6rem 0 4.6rem; }
.section-head { margin-bottom: 2rem; }
.section-head h2 { letter-spacing: -.028em; }
.section-head p { font-size: .95rem; line-height: 1.65; }

.card { padding: 0; overflow: hidden; }
.card-body { padding: 1.3rem 1.45rem 1.45rem; }
.card-media { margin: 0; border-radius: 0; }
.card-media img { height: auto; aspect-ratio: 16 / 9; }
.card--pinned { border-left: 0; box-shadow: inset 4px 0 0 var(--accent), var(--shadow-sm); }
.card--pinned:hover { box-shadow: inset 4px 0 0 var(--accent), var(--shadow-md); }
.card-title { font-size: 1.18rem; letter-spacing: -.015em; }

.sidebar { top: 100px; }
.panel-title { letter-spacing: -.01em; }

@media (max-width: 640px) {
    .masthead { padding: 1rem 0 1.3rem; }
    .masthead-frame { padding: 5px; border-radius: 18px; }
    .masthead-frame img { border-radius: 14px; }
    .card-body { padding: 1.1rem 1.15rem 1.25rem; }
}

/* --- 4. Karty ogłoszeń: układ redakcyjny (obraz + treść obok siebie) --- */
.card--pinned { box-shadow: inset 0 4px 0 var(--accent), var(--shadow-sm); }
.card--pinned:hover { box-shadow: inset 0 4px 0 var(--accent), var(--shadow-md); }

@media (min-width: 900px) {
    .cards .card:has(.card-media) {
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr);
        align-items: stretch;
    }
    .cards .card:has(.card-media) .card-media { height: 100%; }
    .cards .card:has(.card-media) .card-media img {
        height: 100%; min-height: 240px; aspect-ratio: auto; object-fit: cover;
    }
    .cards .card:has(.card-media) .card-body {
        padding: 1.55rem 1.75rem; display: flex; flex-direction: column;
    }
    .cards .card:has(.card-media) .card-title { font-size: 1.3rem; }
    .cards .card:has(.card-media) .card-link { margin-top: auto; }
    .cards .card:has(.card-media) .card-excerpt { max-width: 48ch; }
}

/* --- 5. Sekcja ogłoszeń: mocniejszy nagłówek --- */
.section-head h2 { position: relative; padding-left: 0; }
.section-head p { color: var(--ink-soft); }

/* --- 6. Etykieta sekcji --- */
.section-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    margin: 0 0 .55rem; font-size: .74rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--blue-500);
}
.section-eyebrow-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: currentColor; box-shadow: 0 0 0 3px rgba(29, 132, 198, .14);
}

/* ---------- strona tablicy ---------- */
.page-hero--board { padding-bottom: 2.2rem; }
.page-hero-lead {
    color: var(--ice-200); font-size: 1.02rem; max-width: 44rem; margin: .2rem 0 .8rem;
}
.page-hero-meta {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .78rem; color: rgba(191, 233, 249, .8); margin: 0;
    padding: .25rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
}
.section-eyebrow--light { color: var(--ice-200); margin-bottom: .65rem; }
.section-eyebrow--light .section-eyebrow-dot { box-shadow: 0 0 0 3px rgba(142, 214, 242, .18); }

.board-cover--wide { margin-top: 1.8rem; margin-bottom: -.6rem; }
.board-cover--wide img { max-height: 320px; }

.panel-list--links a.is-current { color: var(--blue-600); font-weight: 650; }

/* nawigacja: dużo zakładek musi się mieścić w jednej linii */
.main-nav { flex-wrap: wrap; justify-content: flex-end; }
.nav-link { white-space: nowrap; }

/* nawigacja z 5 zakładkami: ciaśniejsze odstępy na średnich ekranach */
@media (min-width: 761px) and (max-width: 1140px) {
    .header-inner { gap: 1rem; }
    .nav-link { padding: .5rem .62rem; font-size: .85rem; }
    .main-nav { gap: .15rem; }
    .brand-text span { display: none; }
}

/* ---------- edytor WYSIWYG (Quill) ---------- */
.rich-editor { border-radius: 12px; overflow: hidden; }
.rich-editor .ql-toolbar.ql-snow {
    border: 1px solid var(--line); border-bottom: 0;
    border-radius: 12px 12px 0 0; background: #f7fbfe; padding: 6px 8px;
    font-family: var(--font);
}
.rich-editor .ql-container.ql-snow {
    border: 1px solid var(--line); border-radius: 0 0 12px 12px;
    background: #fff; font-family: var(--font); font-size: .95rem;
}
.rich-editor .ql-editor { min-height: 240px; line-height: 1.65; color: var(--ink); }
.rich-editor .ql-editor.ql-blank::before { color: #93a6b8; font-style: normal; }
.rich-editor .ql-snow .ql-stroke { stroke: #3d566e; }
.rich-editor .ql-snow .ql-fill { fill: #3d566e; }
.rich-editor .ql-snow .ql-picker { color: #3d566e; }
.rich-editor .ql-editor h2 { font-size: 1.35rem; }
.rich-editor .ql-editor h3 { font-size: 1.15rem; }

/* czcionki dostępne w edytorze (klasy Quill) */
.ql-font-arial { font-family: Arial, Helvetica, sans-serif; }
.ql-font-georgia { font-family: Georgia, "Times New Roman", serif; }
.ql-font-verdana { font-family: Verdana, Geneva, sans-serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="arial"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="arial"]::before { content: "Arial"; font-family: Arial, Helvetica, sans-serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="georgia"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="georgia"]::before { content: "Georgia"; font-family: Georgia, serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="verdana"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="verdana"]::before { content: "Verdana"; font-family: Verdana, sans-serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before { content: "Serif"; font-family: Georgia, serif; }
.rich-editor .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.rich-editor .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before { content: "Mono"; font-family: monospace; }
.rich-editor .ql-picker.ql-font .ql-picker-label::before { content: "Czcionka"; }
.rich-editor .ql-picker.ql-size .ql-picker-label::before { content: "Rozmiar"; }
.rich-editor .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.rich-editor .ql-picker.ql-size .ql-picker-item[data-value="small"]::before { content: "Mały"; }
.rich-editor .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.rich-editor .ql-picker.ql-size .ql-picker-item[data-value="large"]::before { content: "Duży"; }
.rich-editor .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.rich-editor .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before { content: "Bardzo duży"; }

/* treść wyrenderowana na stronie */
.rich-content { color: var(--ink-soft); font-size: .96rem; }
.rich-content h2 { font-size: 1.35rem; margin: 1.4rem 0 .6rem; }
.rich-content h3 { font-size: 1.15rem; margin: 1.2rem 0 .5rem; }
.rich-content ul, .rich-content ol { padding-left: 1.25rem; }
.rich-content li { margin-bottom: .3rem; }
.rich-content blockquote {
    margin: 1rem 0; padding: .6rem 1rem; border-left: 4px solid var(--ice-300);
    background: var(--frost-50); border-radius: 0 10px 10px 0; color: var(--ink-soft);
}
.rich-content a { text-decoration: underline; }
.ql-size-small { font-size: .75em; }
.ql-size-large { font-size: 1.5em; }
.ql-size-huge { font-size: 2em; }
.ql-align-center { text-align: center; }
.ql-align-right { text-align: right; }
.ql-align-justify { text-align: justify; }

/* kompaktowy hero tablicy */
.page-hero--board { padding: 1.5rem 0 1.4rem; }
.page-hero--board h1 { font-size: clamp(1.45rem, 2.5vw, 2rem); margin-bottom: .25rem; }
.page-hero--board .breadcrumb { margin-bottom: .45rem; font-size: .78rem; }
.page-hero--board .page-hero-lead { font-size: .93rem; margin: 0; max-width: 54rem; color: rgba(191, 233, 249, .92); }

/* wstęp tablicy z edytora */
.board-intro {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.35rem 1.5rem; margin-bottom: 1.1rem; box-shadow: var(--shadow-sm);
}
.board-intro > :first-child { margin-top: 0; }
.board-intro > :last-child { margin-bottom: 0; }

/* przy 6+ zakładkach wracamy do menu hamburgerowego już od 1024 px */
@media (max-width: 1024px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        background: #fff; border-bottom: 1px solid var(--line); padding: .8rem 1rem 1.1rem;
        flex-direction: column; align-items: stretch; box-shadow: var(--shadow-md);
    }
    .main-nav.is-open { display: flex; }
    .nav-link { padding: .7rem .8rem; white-space: normal; }
    .header-inner { position: relative; min-height: 66px; }
}

/* kompaktowy edytor inline (krótkie teksty, zajawki) */
.rich-editor--inline .ql-editor { min-height: 72px; }
.rich-editor--inline .ql-toolbar.ql-snow { padding: 4px 6px; }
