
/* PRAWNIKOM PRO — POWIAZANIA OSOBOWE KRS */

html body main#main-content.kf-shell[data-kf-person] {
    --kf-navy:#142641;
    --kf-gold:#b58a43;
    --kf-border:#d5dfeb;
    --kf-bg:#f0f4f8;
    --kf-muted:#64748b;

    display:flex !important;
    flex-direction:column !important;
    gap:22px !important;
    min-width:0 !important;
    max-width:100% !important;
    min-height:calc(100vh - 120px);
    padding:24px !important;
    background:var(--kf-bg) !important;
    color:var(--kf-navy) !important;
    font-family:"Segoe UI",Arial,sans-serif;
}

.kf-shell,
.kf-shell * {
    box-sizing:border-box;
}

.kf-shell [hidden] {
    display:none !important;
}

/* POWROT DO KRS */

html body .kf-shell > .kf-back {
    display:inline-flex !important;
    align-items:center;
    align-self:flex-start;
    gap:10px;
    padding:12px 18px !important;
    background:#fff !important;
    border:1px solid #d5dfeb !important;
    color:#142641 !important;
    font-size:13px;
    font-weight:600;
    text-decoration:none !important;
    border-radius:0 !important;
}

/* NAGLOWEK PROFILU */

html body .kf-shell .kf-person-hero {
    display:flex !important;
    align-items:center !important;
    gap:26px !important;
    width:100% !important;
    min-width:0 !important;
    padding:36px !important;
    margin:0 !important;
    background:linear-gradient(120deg,#0d192c,#203b5c) !important;
    border:0 !important;
    border-bottom:3px solid #b58a43 !important;
    border-radius:0 !important;
    color:#fff !important;
}

.kf-shell .kf-person-hero > div {
    flex:1;
    min-width:0;
}

html body .kf-shell .kf-profile-mark {
    position:relative;
    display:grid !important;
    place-items:center;
    width:100px !important;
    height:100px !important;
    flex:0 0 100px;
    background:#ffffff0b !important;
    border:1px solid #b58a43 !important;
    border-radius:0 !important;
    font-size:0 !important;
    color:#d5b16b !important;
}

/* IKONA OSOBY BEZ INLINE STYLE */

.kf-shell .kf-profile-mark::before {
    content:"";
    position:absolute;
    top:20px;
    width:24px;
    height:24px;
    border:2px solid #d5b16b;
    border-radius:50%;
}

.kf-shell .kf-profile-mark::after {
    content:"";
    position:absolute;
    bottom:19px;
    width:46px;
    height:28px;
    border:2px solid #d5b16b;
    border-radius:24px 24px 0 0;
}

html body .kf-shell .kf-person-hero small {
    display:block;
    font-size:11px !important;
    font-weight:700;
    letter-spacing:1.5px;
    color:#e4bf79 !important;
}

html body .kf-shell #kf-name {
    display:block !important;
    font-family:Georgia,"Times New Roman",serif !important;
    font-size:clamp(28px,3vw,44px) !important;
    font-weight:600;
    line-height:1.25 !important;
    margin:12px 0 !important;
    color:#fff !important;
    overflow-wrap:anywhere;
}

html body .kf-shell #kf-basis {
    font-size:14px !important;
    line-height:1.8;
    color:#cbd5e1 !important;
    margin:8px 0 16px !important;
}

html body .kf-shell .kf-proof-tag {
    display:inline-flex !important;
    align-items:center;
    gap:8px;
    padding:7px 12px !important;
    background:#ffffff0b !important;
    border:1px solid #b58a4366 !important;
    color:#e4bf79 !important;
    font-size:12px;
    font-weight:600;
    border-radius:0 !important;
}

.kf-shell .kf-proof-tag::before {
    content:"";
    width:7px;
    height:7px;
    background:#d5b16b;
    border-radius:50%;
}

/* STATYSTYKI OSOBY */

html body .kf-shell .kf-stats {
    display:grid !important;
    grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));
    gap:14px !important;
    min-width:0;
    width:100%;
}

.kf-shell .kf-stats:empty {
    display:none !important;
}

html body .kf-shell .kf-stats > * {
    display:flex !important;
    flex-direction:column;
    justify-content:center;
    gap:8px;
    min-width:0;
    padding:22px !important;
    margin:0 !important;
    background:#fff !important;
    border:1px solid #d5dfeb !important;
    border-left:3px solid #b58a43 !important;
    border-radius:0 !important;
}

.kf-shell .kf-stats :is(b,strong) {
    display:block;
    font-family:Georgia,serif;
    font-size:30px !important;
    line-height:1.3;
    color:#142641 !important;
}

.kf-shell .kf-stats :is(small,span) {
    font-size:12px;
    color:#64748b;
}

/* UKLAD PROFILU */

html body .kf-shell .kf-profile-layout {
    display:grid !important;
    grid-template-columns:260px minmax(0,1fr) !important;
    align-items:start !important;
    gap:22px !important;
    width:100% !important;
    min-width:0 !important;
}

/* BOCZNY PANEL ZRODLOWY */

html body .kf-shell .kf-profile-context {
    display:flex !important;
    flex-direction:column;
    gap:16px;
    position:static !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    padding:22px !important;
    margin:0 !important;
    background:#fff !important;
    border:1px solid #d5dfeb !important;
    border-top:3px solid #b58a43 !important;
    border-radius:0 !important;
}

.kf-shell .kf-profile-context > small,
.kf-shell .kf-results > header small {
    display:block;
    font-size:11px !important;
    font-weight:700;
    letter-spacing:1px;
    color:#96702d !important;
}

html body .kf-shell .kf-profile-context h2 {
    font-family:Georgia,serif !important;
    font-size:24px !important;
    line-height:1.35;
    color:#142641 !important;
    margin:0 !important;
}

.kf-shell .kf-profile-context p {
    font-size:14px !important;
    line-height:1.8 !important;
    color:#64748b !important;
    margin:0 !important;
}

html body .kf-shell .kf-profile-context > a {
    display:block !important;
    padding:14px !important;
    background:#f3f6fa !important;
    border:1px solid #d5dfeb !important;
    border-left:2px solid #b58a43 !important;
    color:#142641 !important;
    font-size:13px;
    font-weight:600;
    line-height:1.6;
    border-radius:0 !important;
    text-decoration:none !important;
}

.kf-shell .kf-profile-context > a:hover {
    background:#e8eff7 !important;
}

/* PANEL SIECI POWIAZAN */

html body .kf-shell .kf-results {
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    padding:26px !important;
    margin:0 !important;
    background:#fff !important;
    border:1px solid #d5dfeb !important;
    border-radius:0 !important;
}

html body .kf-shell .kf-results > header {
    display:flex !important;
    align-items:end !important;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:20px;
    padding:0 0 22px !important;
    margin:0 0 22px !important;
    background:transparent !important;
    border:0 !important;
    border-bottom:1px solid #d5dfeb !important;
}

html body .kf-shell .kf-results > header h2 {
    font-family:Georgia,serif !important;
    font-size:29px !important;
    color:#142641 !important;
    line-height:1.3;
    margin:8px 0 0 !important;
}

/* WYSZUKIWANIE RELACJI */

html body .kf-shell .kf-results > header label {
    display:flex !important;
    flex-direction:column;
    gap:8px;
    flex:1 1 240px;
    max-width:340px;
    min-width:0;
    font-size:12px !important;
    font-weight:600;
    color:#142641 !important;
}

html body .kf-shell #kf-search {
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    height:46px !important;
    padding:12px 15px !important;
    margin:0 !important;
    background:#f8fafc !important;
    color:#142641 !important;
    border:1px solid #cbd5e1 !important;
    border-radius:0 !important;
    font-size:14px !important;
    box-shadow:none !important;
}

.kf-shell #kf-search::placeholder {
    color:#64748b;
    font-weight:400;
}

.kf-shell #kf-search:focus {
    border-color:#b58a43 !important;
    outline:2px solid #b58a4333 !important;
}

/* LISTA RELACJI */

html body .kf-shell #kf-list {
    display:flex !important;
    flex-direction:column !important;
    gap:14px !important;
    width:100% !important;
    min-width:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    color:#64748b;
    font-size:14px;
    line-height:1.7;
}

/* KARTY GENEROWANE DYNAMICZNIE */

html body .kf-shell #kf-list > :is(article,section,div,a) {
    display:block;
    min-width:0 !important;
    max-width:100% !important;
    height:auto !important;
    padding:20px !important;
    margin:0 !important;
    background:#f8fafc !important;
    border:1px solid #d5dfeb !important;
    border-left:3px solid #b58a43 !important;
    border-radius:0 !important;
    overflow-wrap:anywhere;
}

.kf-shell #kf-list :is(h2,h3,h4) {
    font-family:"Segoe UI",Arial,sans-serif !important;
    font-size:17px !important;
    font-weight:700 !important;
    line-height:1.5;
    color:#142641 !important;
    margin:0 0 12px !important;
}

.kf-shell #kf-list :is(b,strong) {
    color:#142641 !important;
    font-weight:600;
}

.kf-shell #kf-list small {
    display:block;
    color:#64748b !important;
    font-size:12px !important;
    line-height:1.7;
}

.kf-shell #kf-list p {
    font-size:14px;
    line-height:1.8;
    color:#475569;
    margin:8px 0;
}

.kf-shell #kf-list a {
    color:#174b92 !important;
    font-weight:600;
    text-decoration:none !important;
    overflow-wrap:anywhere;
}

.kf-shell #kf-list a:hover {
    color:#96702d !important;
}

/* DANE REJESTROWE */

.kf-shell #kf-list dl {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr));
    gap:10px;
    margin:14px 0;
}

.kf-shell #kf-list dl > div {
    padding:12px;
    background:#fff;
    border:1px solid #d5dfeb;
}

.kf-shell #kf-list dt {
    font-size:11px;
    font-weight:600;
    color:#64748b;
}

.kf-shell #kf-list dd {
    font-size:14px;
    font-weight:600;
    color:#142641;
    margin:5px 0 0;
    overflow-wrap:anywhere;
}

/* TABELE JEZELI WYSTEPUJA */

.kf-shell #kf-list table {
    width:100%;
    border-collapse:collapse;
    font-size:13px;
    color:#142641;
}

.kf-shell #kf-list th {
    padding:12px;
    background:#142641;
    color:#fff;
    text-align:left;
}

.kf-shell #kf-list td {
    padding:12px;
    border-bottom:1px solid #d5dfeb;
    vertical-align:top;
    overflow-wrap:anywhere;
}

.kf-shell #kf-list tr:nth-child(even) td {
    background:#f3f6fa;
}

/* PAGINACJA */

html body .kf-shell .kf-pages {
    display:flex !important;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:8px;
    padding:20px 0 0 !important;
    margin:22px 0 0 !important;
    border-top:1px solid #d5dfeb;
}

.kf-shell .kf-pages:empty {
    display:none !important;
}

html body .kf-shell .kf-pages :is(button,a) {
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    min-width:40px;
    min-height:40px;
    padding:10px 15px !important;
    background:#fff !important;
    color:#142641 !important;
    border:1px solid #d5dfeb !important;
    border-radius:0 !important;
    font-size:13px;
    font-weight:600;
}

.kf-shell .kf-pages :is(.active,[aria-current="page"]) {
    background:#142641 !important;
    color:#fff !important;
    border-color:#142641 !important;
}

.kf-shell .kf-pages button:disabled {
    opacity:.5;
    cursor:not-allowed;
}

/* INFORMACJA O ZRODLACH I PRYWATNOSCI */

html body .kf-shell > .kf-note {
    display:block !important;
    padding:20px 24px !important;
    margin:0 !important;
    background:#fff !important;
    color:#64748b !important;
    border:1px solid #d5dfeb !important;
    border-left:3px solid #b58a43 !important;
    border-radius:0 !important;
    font-size:13px !important;
    line-height:1.9 !important;
}

/* LINKI I DOSTEPNOSC */

.kf-shell a {
    text-decoration:none !important;
}

.kf-shell :is(a,button,input):focus-visible {
    outline:2px solid #b58a43 !important;
    outline-offset:3px;
}

/* TABLET */

@media(max-width:1200px) {

    html body .kf-shell .kf-profile-layout {
        grid-template-columns:220px minmax(0,1fr) !important;
        gap:14px !important;
    }

    html body .kf-shell .kf-results {
        padding:20px !important;
    }

}

/* TELEFON */

@media(max-width:900px) {

    html body .kf-shell .kf-profile-layout {
        grid-template-columns:minmax(0,1fr) !important;
    }

    html body .kf-shell .kf-results > header label {
        max-width:100%;
    }

}

@media(max-width:600px) {

    html body main#main-content.kf-shell[data-kf-person] {
        padding:12px !important;
        gap:14px !important;
    }

    html body .kf-shell .kf-person-hero {
        padding:22px !important;
        flex-direction:column;
        align-items:flex-start !important;
        gap:16px !important;
    }

    html body .kf-shell .kf-profile-mark {
        width:80px !important;
        height:80px !important;
        flex:0 0 80px;
    }

    .kf-shell .kf-profile-mark::before {
        top:12px;
    }

    .kf-shell .kf-profile-mark::after {
        bottom:10px;
    }

    html body .kf-shell .kf-stats {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    html body .kf-shell .kf-stats > * {
        padding:14px !important;
    }

    html body .kf-shell .kf-results,
    html body .kf-shell .kf-profile-context {
        padding:16px !important;
    }

    html body .kf-shell #kf-list > :is(article,section,div,a) {
        padding:14px !important;
    }

    .kf-shell #kf-list:has(table) {
        overflow-x:auto !important;
    }

}

/* WYDRUK */

@media print {

    .kf-shell .kf-back,
    .kf-shell .kf-profile-context,
    .kf-shell .kf-pages,
    .kf-shell .kf-results > header label {
        display:none !important;
    }

    html body .kf-shell .kf-profile-layout {
        display:block !important;
    }

    html body .kf-shell .kf-person-hero {
        background:#fff !important;
        border:1px solid #ccc !important;
    }

    html body .kf-shell #kf-name,
    html body .kf-shell #kf-basis,
    html body .kf-shell .kf-person-hero small {
        color:#000 !important;
    }

}

