/* =========================================================
   Portal Najemcy — arkusz stylów
   System projektowy: vector.net (tokeny z oficjalnego motywu)
   ========================================================= */

:root {
    /* Tokeny kolorów — wprost z vector.net */
    --black:      #000000;
    --dark-grey:  #1f1f1f;
    --grey-80:    #131313;
    --grey-10:    #e8e8e8;
    --light-grey: #f5f5f5;
    --white:      #ffffff;
    --green-60:   #53b36e;  --green-20: #ddf0e2;  --green-10: #edf7f0;
    --pink-60:    #ee2b7a;  --pink-20:  #fcd5e4;  --pink-10:  #fde9f1;
    --blue-60:    #0c8ce9;  --blue-20:  #cee8fb;  --blue-10:  #e6f3fd;

    --muted:      #6f6f6f;
    --ok-bg: var(--green-10); --ok-tx: #2c7a45;
    --err-bg: var(--pink-10); --err-tx: #c01458;

    --wrap: 1180px;
    --sans: "Proxima Nova", "Mulish", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--dark-grey);
    background: var(--white);
    line-height: 1.65;
    font-size: 17px;
}

a { color: var(--dark-grey); }
a:hover { color: var(--black); }
.content a, .ann a, p a { text-decoration-color: var(--green-60); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Etykieta sekcji (eyebrow) */
.eyebrow {
    font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--muted); font-weight: 700; margin: 0 0 10px;
}

/* =========================================================
   PRZYCISKI — styl „wizjera" z narożnikami (jak na vector.net)
   ========================================================= */
.btn {
    position: relative; display: inline-block;
    padding: 13px 28px; margin: 6px;
    background: var(--white); color: var(--dark-grey);
    border: 1px solid #d9d9d9; border-radius: 0;
    font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: .01em;
    text-decoration: none; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.btn::before {
    content: ""; position: absolute; inset: -6px; pointer-events: none;
    --c: var(--dark-grey);
    background:
        linear-gradient(var(--c), var(--c)) left 0 top 0 / 10px 1px,
        linear-gradient(var(--c), var(--c)) left 0 top 0 / 1px 10px,
        linear-gradient(var(--c), var(--c)) right 0 top 0 / 10px 1px,
        linear-gradient(var(--c), var(--c)) right 0 top 0 / 1px 10px,
        linear-gradient(var(--c), var(--c)) left 0 bottom 0 / 10px 1px,
        linear-gradient(var(--c), var(--c)) left 0 bottom 0 / 1px 10px,
        linear-gradient(var(--c), var(--c)) right 0 bottom 0 / 10px 1px,
        linear-gradient(var(--c), var(--c)) right 0 bottom 0 / 1px 10px;
    background-repeat: no-repeat;
}
.btn:hover { background: var(--dark-grey); color: var(--white); }

/* Wariant na ciemnym tle (header, hero, gradient) */
.btn.light {
    background: transparent; color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
}
.btn.light::before { --c: var(--white); }
.btn.light:hover { background: var(--white); color: var(--dark-grey); }

/* Warianty pomocnicze (panel) — bez narożników, spokojniejsze */
.btn.small { padding: 7px 14px; font-size: 13px; margin: 0; }
.btn.small::before { display: none; }
.btn.solid { background: var(--dark-grey); color: var(--white); border-color: var(--dark-grey); }
.btn.solid:hover { background: var(--black); }
.btn.secondary { background: var(--light-grey); border-color: var(--grey-10); }
.btn.secondary:hover { background: var(--grey-10); color: var(--dark-grey); }
.btn.danger { background: var(--pink-10); color: var(--err-tx); border-color: var(--pink-20); }
.btn.danger:hover { background: var(--pink-20); color: var(--err-tx); }

/* =========================================================
   NAGŁÓWEK / NAWIGACJA — czarny pasek jak na vector.net
   ========================================================= */
.site-header { background: var(--black); color: var(--white); }
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; min-height: 84px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--white); text-decoration: none; }
.brand svg { display: block; height: 22px; width: auto; }
.brand .brand-sep { width: 1px; height: 26px; background: rgba(255,255,255,.35); }
.brand .brand-name {
    font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
    color: rgba(255,255,255,.75); font-weight: 600; white-space: nowrap;
}

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a {
    color: var(--white); text-decoration: none; font-size: 15px; font-weight: 400;
    padding: 10px 13px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav a:hover { color: var(--white); border-bottom-color: rgba(255,255,255,.4); }
.nav a.active { font-weight: 600; border-bottom-color: var(--green-60); }

/* Menu mobilne (checkbox, bez JS) */
.nav-toggle, .nav-toggle-label { display: none; }

/* =========================================================
   HERO — czerń z subtelną poświatą światłowodów
   ========================================================= */
.hero {
    background:
        radial-gradient(55% 130% at 88% 10%, rgba(83, 179, 110, 0.22), transparent 60%),
        radial-gradient(45% 120% at 70% 90%, rgba(12, 140, 233, 0.16), transparent 55%),
        radial-gradient(35% 100% at 12% 100%, rgba(238, 43, 122, 0.10), transparent 50%),
        var(--black);
    color: var(--white); padding: 72px 0 64px;
}
.hero .eyebrow { color: rgba(255,255,255,.55); }
.hero h1 { margin: 0 0 14px; font-size: 42px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; max-width: 22ch; }
.hero .content { color: #c9c9c9; max-width: 62ch; }
.hero .content p { margin: 0 0 8px; }

/* =========================================================
   KAFELKI SKRÓTÓW — poziome pasy z kolorową dolną krawędzią
   (jak sekcja „Rozwiązania technologiczne" na vector.net)
   ========================================================= */
.tiles { display: grid; gap: 14px; margin: 34px 0; }
.tile {
    --acc: var(--green-60); --tint: var(--green-10);
    display: flex; align-items: center; gap: 18px;
    padding: 22px 26px;
    background: linear-gradient(90deg, var(--tint) 0%, var(--white) 65%);
    border-bottom: 2px solid var(--acc);
    text-decoration: none; color: var(--dark-grey);
    transition: transform .15s ease;
}
.tile:hover { transform: translateX(4px); color: var(--dark-grey); }
.tile.t-green { --acc: var(--green-60); --tint: var(--green-10); }
.tile.t-pink  { --acc: var(--pink-60);  --tint: var(--pink-10);  }
.tile.t-blue  { --acc: var(--blue-60);  --tint: var(--blue-10);  }
.tile .t-body { flex: 1 1 auto; min-width: 0; }
.tile .t-label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tile .t-name { font-size: 19px; font-weight: 700; margin: 1px 0 0; }
.tile .t-desc { font-size: 14.5px; color: var(--muted); margin-top: 1px; }
.tile .t-arrow { flex: none; font-size: 20px; color: var(--acc); transition: transform .15s ease; }
.tile:hover .t-arrow { transform: translateX(4px); }

@media (min-width: 861px) {
    .tiles.cols-2 { grid-template-columns: 1fr 1fr; }
}

/* =========================================================
   TREŚĆ / KARTY
   ========================================================= */
main { padding: 44px 0 80px; background: var(--white); }
.page-head { margin: 0 0 26px; }
.page-head h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.01em; }

.card {
    background: var(--white); border: 1px solid var(--grey-10);
    border-radius: 0; padding: 30px 34px; margin-bottom: 22px;
}
.content h2 { font-size: 23px; margin: 28px 0 10px; font-weight: 700; }
.content h3 { font-size: 19px; margin: 22px 0 8px; font-weight: 700; }
.content p, .content li { color: #333; }
.content ul, .content ol { padding-left: 24px; }
.content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.content th, .content td { border: 1px solid var(--grey-10); padding: 9px 12px; text-align: left; }
.content th { background: var(--light-grey); }
.content hr { border: none; border-top: 1px solid var(--grey-10); margin: 22px 0; }

.updated { color: var(--muted); font-size: 13px; margin-top: 20px; }

/* Baner CTA z gradientem marki (róż → błękit → zieleń) */
.cta-banner {
    margin-top: 26px; padding: 34px 36px;
    background: linear-gradient(100deg, var(--pink-60) 0%, var(--blue-60) 52%, var(--green-60) 100%);
    color: var(--white);
}
.cta-banner h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.cta-banner p { margin: 0 0 18px; color: rgba(255,255,255,.9); }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.contact-item { border: 1px solid var(--grey-10); border-top: 2px solid var(--green-60); padding: 16px 18px; background: var(--white); }
.contact-item:nth-child(3n+2) { border-top-color: var(--pink-60); }
.contact-item:nth-child(3n)   { border-top-color: var(--blue-60); }
.contact-item .k { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contact-item .v { font-size: 18px; font-weight: 700; margin-top: 4px; }
.contact-item .v a { text-decoration: none; }

/* Ogłoszenia */
.ann { border-bottom: 1px solid var(--grey-10); padding: 18px 0; }
.ann:last-child { border-bottom: none; }
.ann .date { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.ann h3 { margin: 4px 0 6px; font-size: 19px; font-weight: 700; }
.ann h3 a { text-decoration: none; color: var(--dark-grey); }
.ann h3 a:hover { color: var(--black); text-decoration: underline; text-decoration-color: var(--green-60); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Dokumenty */
.doc-cat {
    margin: 30px 0 12px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--dark-grey); font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.doc-cat::before { content: ""; width: 22px; height: 3px; background: var(--cat-acc, var(--green-60)); }
.doc {
    display: flex; align-items: center; gap: 16px; padding: 15px 18px;
    border: 1px solid var(--grey-10); margin-bottom: 8px; background: var(--white);
    transition: transform .15s ease;
}
a.doc:hover { transform: translateX(4px); }
.doc .ext {
    flex: none; width: 48px; height: 48px; display: grid; place-items: center;
    background: var(--black); color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: .05em;
}
.doc .meta { flex: 1 1 auto; min-width: 0; }
.doc .meta .name { font-weight: 700; }
.doc .meta .desc { color: var(--muted); font-size: 14px; }
.doc .meta .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: block; }

.empty { color: var(--muted); font-style: italic; padding: 10px 0; }

/* =========================================================
   STOPKA — czarna, jak na vector.net
   ========================================================= */
.site-footer { background: var(--black); color: #9a9a9a; padding: 40px 0 34px; font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-footer .f-brand { display: flex; align-items: center; gap: 14px; color: var(--white); }
.site-footer .f-brand svg { height: 20px; width: auto; }
.site-footer a { color: #d0d0d0; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }

/* =========================================================
   PANEL ADMINISTRACYJNY
   ========================================================= */
.admin-body { background: var(--light-grey); }
.admin-top { background: var(--black); color: var(--white); }
.admin-top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.admin-top .who { font-size: 14px; color: #bdbdbd; }
.admin-top .who strong { color: var(--white); }
.admin-top .who a { color: #e5e5e5; }

.admin-layout { display: grid; grid-template-columns: 230px 1fr; gap: 24px; padding: 28px 0 70px; align-items: start; }
.side { background: var(--white); border: 1px solid var(--grey-10); }
.side a { display: block; padding: 12px 18px; text-decoration: none; color: var(--dark-grey); border-left: 3px solid transparent; font-size: 15px; }
.side a:hover { background: var(--light-grey); }
.side a.active { border-left-color: var(--green-60); background: var(--light-grey); font-weight: 700; }
.side .grp { padding: 14px 18px 5px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }

.panel { background: var(--white); border: 1px solid var(--grey-10); padding: 28px 30px; }
.panel h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; }
.panel .lead { color: var(--muted); margin: 0 0 22px; font-size: 15px; }
.panel .tiles { margin: 20px 0 0; }

/* Formularze */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=date],
select, textarea {
    width: 100%; padding: 11px 13px; border: 1px solid #cfcfcf; border-radius: 0;
    font-family: inherit; font-size: 15px; color: var(--dark-grey); background: var(--white);
}
input:focus, select:focus, textarea:focus, [contenteditable]:focus {
    outline: 2px solid var(--green-60); outline-offset: 0; border-color: var(--green-60);
}
textarea { min-height: 120px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.actions { display: flex; gap: 14px; align-items: center; margin-top: 22px; flex-wrap: wrap; }

/* Edytor treści */
.editor-tools { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.editor-tools button {
    border: 1px solid #cfcfcf; background: var(--white); border-radius: 0; padding: 6px 11px;
    cursor: pointer; font-size: 13px; font-weight: 600; color: var(--dark-grey); font-family: inherit;
}
.editor-tools button:hover { background: var(--light-grey); }
.editor {
    border: 1px solid #cfcfcf; min-height: 260px; padding: 13px 15px;
    background: var(--white); overflow-y: auto;
}
.editor:empty:before { content: attr(data-placeholder); color: #9a9a9a; }

/* Tabele w panelu */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 12px; border-bottom: 1px solid var(--grey-10); font-size: 14.5px; vertical-align: middle; }
table.list th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
table.list tr:hover td { background: #fafafa; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; background: var(--light-grey); color: var(--dark-grey); }
.tag.on    { background: var(--green-10); color: #2c7a45; }
.tag.off   { background: var(--grey-10);  color: var(--muted); }
.tag.admin { background: var(--blue-10);  color: #0b6ab0; }

/* Komunikaty */
.flash { padding: 13px 17px; margin-bottom: 20px; font-size: 14.5px; border-left: 3px solid; }
.flash.ok  { background: var(--ok-bg);  color: var(--ok-tx);  border-color: var(--green-60); }
.flash.err { background: var(--err-bg); color: var(--err-tx); border-color: var(--pink-60); }

/* Logowanie — czarna strona z logo, biała karta */
.login-body { background: var(--black); min-height: 100vh; }
.login-wrap { max-width: 400px; margin: 0 auto; padding: 9vh 20px 40px; }
.login-logo { text-align: center; color: var(--white); margin-bottom: 10px; }
.login-logo svg { height: 26px; width: auto; }
.login-sub { text-align: center; color: rgba(255,255,255,.55); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; margin: 0 0 26px; }
.login-card { background: var(--white); border: 1px solid var(--grey-10); padding: 32px 32px 28px; }
.login-back { text-align: center; margin-top: 18px; }
.login-back a { color: #bdbdbd; font-size: 14px; }
.login-back a:hover { color: var(--white); }

/* =========================================================
   RESPONSYWNOŚĆ
   ========================================================= */
@media (max-width: 860px) {
    .hero h1 { font-size: 30px; }
    .page-head h1 { font-size: 27px; }
    .admin-layout { grid-template-columns: 1fr; }
    .row { grid-template-columns: 1fr; }
    .card { padding: 22px 20px; }

    .nav-toggle-label {
        display: inline-block; color: var(--white); cursor: pointer; font-size: 24px; padding: 6px 10px; user-select: none;
    }
    .nav {
        flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0;
        max-height: 0; overflow: hidden; transition: max-height .2s ease;
    }
    .nav a { padding: 13px 8px; border-bottom: 1px solid #222; }
    .nav a.active { border-bottom-color: var(--green-60); }
    .nav-toggle:checked ~ .nav { max-height: 560px; padding-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
