/* ==========================================================================
   Panel administracyjny klubu
   ========================================================================== */

:root {
    --glowny: #e01327;
    --tlo: #f2f2f5;
    --panel: #ffffff;
    --bok: #15151d;
    --tekst: #1a1a20;
    --tekst-jasny: #6a6a78;
    --ramka: #e2e2e9;
    --radius: 12px;
    --cien: 0 1px 2px rgba(20, 20, 30, .05), 0 6px 18px rgba(20, 20, 30, .06);
}

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

body {
    margin: 0;
    background: var(--tlo);
    color: var(--tekst);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15.5px;
    line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: var(--glowny); }

/* ── Układ ─────────────────────────────────────────────────────────────── */

.panel { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }

.bok {
    background: var(--bok);
    color: #c9c9d6;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.bok__logo { display: flex; gap: 12px; align-items: center; padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.bok__logo span {
    width: 42px; height: 42px; flex: 0 0 42px;
    display: grid; place-items: center;
    background: var(--glowny); color: #fff;
    border-radius: 50%; font-weight: 700; font-size: 1.2rem;
}
.bok__logo strong { color: #fff; display: block; font-size: .98rem; }
.bok__logo small { color: #82828f; font-size: .8rem; }

.bok nav { padding: 14px 10px; display: grid; gap: 2px; align-content: start; flex: 1; overflow-y: auto; }
.bok nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #c9c9d6;
    text-decoration: none;
    font-size: .96rem;
}
.bok nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.bok nav a.aktywny { background: var(--glowny); color: #fff; }
.bok .ikona { width: 20px; text-align: center; font-size: 1rem; }
.bok .licznik {
    margin-left: auto; background: var(--glowny); color: #fff;
    border-radius: 20px; padding: 1px 8px; font-size: .78rem;
}
.bok nav a.aktywny .licznik { background: rgba(0,0,0,.3); }
.bok__dol { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 8px; }
.bok__dol a { color: #9d9dab; text-decoration: none; font-size: .9rem; }
.bok__dol a:hover { color: #fff; }

.tresc { min-width: 0; }
.tresc__gora {
    background: var(--panel);
    border-bottom: 1px solid var(--ramka);
    padding: 18px 28px;
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.tresc__gora h1 { margin: 0; font-size: 1.42rem; }
.tresc__srodek { padding: 26px 28px 60px; max-width: 1100px; }

@media (max-width: 860px) {
    .panel { grid-template-columns: 1fr; }
    .bok { position: static; height: auto; }
    .bok nav { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); display: grid; }
    .tresc__srodek { padding: 20px 16px 50px; }
    .tresc__gora { padding: 16px; }
}

/* ── Karty i tabele ────────────────────────────────────────────────────── */

.karta {
    background: var(--panel);
    border: 1px solid var(--ramka);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--cien);
}
.karta h2 { margin: 0 0 4px; font-size: 1.15rem; }
.karta h2 + p { margin-top: 0; color: var(--tekst-jasny); font-size: .92rem; }

.kafle { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kafel {
    background: var(--panel);
    border: 1px solid var(--ramka);
    border-radius: var(--radius);
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--cien);
}
.kafel:hover { border-color: var(--glowny); }
.kafel b { display: block; font-size: 2rem; line-height: 1.1; color: var(--glowny); }
.kafel span { font-size: .88rem; color: var(--tekst-jasny); }

table.lista { width: 100%; border-collapse: collapse; background: var(--panel); }
table.lista th, table.lista td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--ramka); vertical-align: middle; }
table.lista th { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tekst-jasny); }
table.lista tr:last-child td { border-bottom: 0; }
table.lista img.mini { width: 74px; height: 50px; object-fit: cover; border-radius: 6px; }
.owijka-tabeli { overflow-x: auto; border: 1px solid var(--ramka); border-radius: var(--radius); box-shadow: var(--cien); }

/* ── Przyciski ─────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--glowny); color: #fff;
    border: 1px solid transparent; border-radius: 8px;
    padding: 9px 16px;
    font: inherit; font-weight: 600; font-size: .94rem;
    cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(.92); }
.btn--jasny { background: #fff; color: var(--tekst); border-color: var(--ramka); }
.btn--jasny:hover { border-color: var(--tekst-jasny); filter: none; }
.btn--ciemny { background: #1f1f29; }
.btn--groza { background: #fff; color: #b91c1c; border-color: #f1c3c3; }
.btn--groza:hover { background: #b91c1c; color: #fff; filter: none; }
.btn--mala { padding: 6px 11px; font-size: .86rem; }
.paski-akcji { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.paski-akcji--prawo { justify-content: flex-end; }

/* ── Formularze ────────────────────────────────────────────────────────── */

.pole { display: grid; gap: 6px; margin-bottom: 16px; }
.pole label { font-size: .84rem; font-weight: 600; color: var(--tekst-jasny); }
.pole input[type=text], .pole input[type=email], .pole input[type=tel], .pole input[type=url],
.pole input[type=password], .pole input[type=date], .pole input[type=time], .pole input[type=number],
.pole select, .pole textarea {
    font: inherit;
    padding: 10px 12px;
    border: 1.5px solid var(--ramka);
    border-radius: 8px;
    background: #fff;
    width: 100%;
    color: var(--tekst);
}
.pole input:focus, .pole select:focus, .pole textarea:focus {
    outline: none; border-color: var(--glowny);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--glowny) 15%, transparent);
}
.pole textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.pole small { color: var(--tekst-jasny); font-size: .82rem; }
.pole input[type=color] { width: 64px; height: 40px; padding: 2px; border: 1.5px solid var(--ramka); border-radius: 8px; background: #fff; }
.rzad { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.checkbox { display: flex; gap: 9px; align-items: flex-start; font-size: .94rem; margin-bottom: 16px; }
.checkbox input { margin-top: 4px; }

.podglad-zdjecia {
    display: flex; gap: 14px; align-items: center;
    padding: 12px; border: 1px dashed var(--ramka); border-radius: 10px; margin-bottom: 10px;
}
.podglad-zdjecia img { width: 130px; height: 86px; object-fit: cover; border-radius: 6px; }
input[type=file] {
    font: inherit; padding: 10px; width: 100%;
    border: 1.5px dashed var(--ramka); border-radius: 8px; background: #fff;
}

/* ── Komunikaty ────────────────────────────────────────────────────────── */

.komunikat { border-radius: 10px; padding: 13px 16px; margin-bottom: 20px; font-size: .95rem; }
.komunikat--ok { background: #e8f7ed; border: 1px solid #b4e2c2; color: #14532d; }
.komunikat--blad { background: #fdeaec; border: 1px solid #f3b8bf; color: #7f1120; }
.wskazowka { background: #fff8e6; border: 1px solid #f2dfae; color: #6b4e12; border-radius: 10px; padding: 13px 16px; font-size: .92rem; margin-bottom: 20px; }

.pusto { border: 2px dashed var(--ramka); border-radius: var(--radius); padding: 34px 20px; text-align: center; color: var(--tekst-jasny); background: var(--panel); }

.znak { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: #ececf2; color: var(--tekst-jasny); }
.znak--ok { background: #e8f7ed; color: #14532d; }
.znak--nie { background: #fdeaec; color: #7f1120; }
.znak--nowe { background: var(--glowny); color: #fff; }

/* ── Logowanie ─────────────────────────────────────────────────────────── */

.logowanie { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #15151d; }
.logowanie .karta { width: 100%; max-width: 420px; margin: 0; }
.logowanie h1 { font-size: 1.4rem; margin: 0 0 6px; }
.logowanie p.pod { color: var(--tekst-jasny); font-size: .92rem; margin-top: 0; }

/* ── Kadra / listy dynamiczne ──────────────────────────────────────────── */

.wiersz-kadry { display: grid; grid-template-columns: 90px 1fr 1fr 44px; gap: 10px; margin-bottom: 8px; align-items: center; }
.wiersz-kadry input { font: inherit; padding: 9px 11px; border: 1.5px solid var(--ramka); border-radius: 8px; width: 100%; }
.wiersz-kadry button {
    border: 1px solid var(--ramka); background: #fff; border-radius: 8px;
    height: 38px; cursor: pointer; color: #b91c1c; font-size: 1rem;
}
.wiersz-kadry button:hover { background: #b91c1c; color: #fff; }
@media (max-width: 640px) { .wiersz-kadry { grid-template-columns: 70px 1fr 44px; } }

/* ── Siatka zdjęć w albumie ────────────────────────────────────────────── */

.zdjecia-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.zdjecie-admin { border: 1px solid var(--ramka); border-radius: 10px; overflow: hidden; background: #fff; }
.zdjecie-admin img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.zdjecie-admin .srodek-karty { padding: 10px; display: grid; gap: 8px; }
.zdjecie-admin input[type=text] { font: inherit; font-size: .88rem; padding: 7px 9px; border: 1.5px solid var(--ramka); border-radius: 6px; width: 100%; }
.zdjecie-admin .rzad-akcji { display: flex; gap: 6px; justify-content: space-between; align-items: center; }
