
/* POPRAWNY UKLAD PROFILU KRS */

html body .krs-content {
    display: grid !important;
    grid-template-columns: 270px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

/* PANEL BOCZNY */

html body .krs-content aside.module-rail {
    position: sticky !important;
    top: calc(var(--pp-header-offset, 120px) + 20px) !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 14px !important;
    transform: none !important;
    float: none !important;
    box-sizing: border-box !important;
}

/* GLOWNA TRESC */

html body .krs-content > .module-canvas {
    position: relative !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    left: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
}

html body .krs-content .module-canvas-scroll,
html body .krs-content [data-entity-layout],
html body .krs-content [data-entity-views] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* NAGLOWEK PODMIOTU */

html body .krs-content .hero {
    width: 100% !important;
    max-width: 100% !important;
    padding: 26px !important;
    margin: 0 0 16px !important;
    box-sizing: border-box !important;
}

html body .krs-content .hero-row {
    grid-template-columns: minmax(0, 1fr) !important;
}

html body .krs-content .hero h1 {
    font-size: clamp(22px, 2vw, 32px) !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}

html body .krs-content .krs-hero-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

html body .krs-content .hero-status {
    display: grid !important;
    grid-template-columns: repeat(
        auto-fit, minmax(140px, 1fr)
    ) !important;
    gap: 10px !important;
}

/* KOMPAKTOWE MENU */

html body .krs-content aside.module-rail
#widoki-podmiotu > a {
    min-height: 38px !important;
    padding: 8px 10px !important;
    gap: 10px !important;
}

html body .krs-content .pp-krs-nav-label {
    font-size: 13px !important;
}

/* DANE IDENTYFIKACYJNE */

html body .krs-content .metrics {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    min-width: 0 !important;
    gap: 10px !important;
}

html body .krs-content .metrics article {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
}

/* TABLET I TELEFON */

@media (max-width: 1100px) {

    html body .krs-content {
        grid-template-columns: minmax(0,1fr) !important;
        padding: 12px !important;
    }

    html body .krs-content aside.module-rail {
        position: relative !important;
        top: auto !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    html body .krs-content > .module-canvas {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    html body .krs-content aside.module-rail
    #widoki-podmiotu {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }
}

@media (max-width: 500px) {

    html body .krs-content .hero {
        padding: 16px !important;
    }

    html body .krs-content .metrics {
        grid-template-columns: minmax(0,1fr) !important;
    }
}

