
/* CEIDG PREMIUM */

main.content:has([data-ceidg-catalog]) {
    --ce-navy: #142641;
    --ce-gold: #c6a46a;
    --ce-border: #dce4ee;
    --ce-muted: #64748b;
    --ce-bg: #f1f5f9;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    background: var(--ce-bg);
}

main.content:has([data-ceidg-catalog]) * {
    box-sizing: border-box;
    border-radius: 0 !important;
}

/* Wyszukiwarka po NIP */

html body main.content:has([data-ceidg-catalog])
.public-register-search {
    display: block !important;
    padding: 28px !important;
    margin: 20px 0 !important;
    background: #fff !important;
    border: 1px solid #dce4ee !important;
    border-top: 3px solid #c6a46a !important;
}

.public-register-search-copy {
    display: flex !important;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.public-register-search-copy > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    background: #142641;
    color: #c6a46a;
}

.public-register-search-copy > span svg {
    width: 30px;
    height: 30px;
}

.public-register-search-copy small {
    color: #96702d !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.public-register-search-copy h2 {
    color: #142641 !important;
    font-family: Georgia, serif;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.35;
    margin: 8px 0;
}

.public-register-search-copy p {
    color: #64748b !important;
    margin: 0;
}

/* Formularz */

html body .public-register-search .public-register-form {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: end !important;
    gap: 14px !important;
    padding: 20px !important;
    background: #f5f7fa !important;
    border: 1px solid #dce4ee;
}

.public-register-form label {
    display: grid !important;
    gap: 8px;
    min-width: 0;
}

.public-register-form label > span {
    color: #142641 !important;
    font-size: 13px;
    font-weight: 600;
}

html body .public-register-form .pp-input-shell {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 0 14px !important;
    background: #fff !important;
    border: 1px solid #cbd5e1 !important;
    min-height: 48px;
}

.public-register-form .pp-input-shell svg {
    color: #96702d;
    flex-shrink: 0;
}

html body .public-register-form input:not([type="hidden"]) {
    width: 100% !important;
    min-width: 0;
    height: 46px !important;
    background: transparent !important;
    color: #142641 !important;
    border: 0 !important;
    box-shadow: none !important;
}

html body .public-register-form button[type="submit"],
html body [data-ceidg-form] button[type="submit"] {
    min-height: 48px !important;
    padding: 12px 22px !important;
    background: #142641 !important;
    color: #fff !important;
    border: 1px solid #142641 !important;
    font-size: 14px !important;
    font-weight: 600;
}

/* Zakres dostepnych danych */

html body .public-register-scope {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    gap: 12px !important;
    margin-top: 20px;
}

.public-register-scope article {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid #dce4ee;
}

.public-register-scope article > span {
    color: #96702d;
}

.public-register-scope article small {
    display: block;
    color: #64748b !important;
    font-size: 11px;
}

.public-register-scope article b {
    color: #142641 !important;
    font-size: 14px;
}

/* Katalog CEIDG */

html body section.ceidg-catalog[data-ceidg-catalog] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 26px !important;
    margin: 20px 0 !important;
    background: #fff !important;
    border: 1px solid #dce4ee !important;
    border-top: 3px solid #c6a46a !important;
    scroll-margin-top: calc(var(--pp-header-offset,120px) + 20px);
}

.ceidg-catalog > header {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
}

.ceidg-catalog > header h2 {
    font-family: Georgia, serif;
    font-size: 28px;
    color: #142641 !important;
    margin: 8px 0;
}

.ceidg-catalog > header p {
    color: #64748b !important;
}

.ceidg-catalog .eyebrow {
    color: #96702d !important;
    font-size: 11px;
    letter-spacing: 1px;
}

.ceidg-catalog [data-ceidg-total] {
    padding: 10px 16px;
    background: #eef2f7;
    color: #142641 !important;
    border-left: 3px solid #c6a46a;
    font-size: 14px;
}

/* FILTRY NAD WYNIKAMI */

html body .ceidg-catalog details.portal-horizontal-drawer {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    padding: 20px !important;
    margin: 0 0 20px !important;
    background: #f8fafc !important;
    color: #142641 !important;
    border: 1px solid #dce4ee !important;
}

html body .ceidg-catalog details > summary {
    padding: 0 0 16px !important;
    background: transparent !important;
    color: #142641 !important;
    font-size: 15px !important;
    font-weight: 700;
    cursor: pointer;
}

html body .ceidg-catalog form[data-ceidg-form] {
    display: grid !important;
    grid-template-columns:
        minmax(220px,2fr)
        minmax(150px,1fr)
        minmax(150px,1fr)
        auto !important;
    align-items: end !important;
    gap: 14px !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
}

.ceidg-catalog form label {
    display: grid !important;
    gap: 8px !important;
    min-width: 0;
    margin: 0 !important;
}

.ceidg-catalog form label > span:first-child {
    color: #142641 !important;
    font-size: 12px !important;
    font-weight: 600;
}

.ceidg-catalog form label > div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ceidg-catalog form label > div > svg {
    color: #96702d;
    flex-shrink: 0;
}

.ceidg-catalog .field-suggest {
    position: relative;
    flex: 1;
    min-width: 0;
}

html body .ceidg-catalog input[type="search"],
html body .ceidg-catalog .smart-select-trigger {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 10px 14px !important;
    color: #142641 !important;
    background: #fff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    font-size: 13px !important;
}

.ceidg-catalog .smart-select-trigger {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px;
}

.ceidg-catalog .smart-select-trigger > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #142641 !important;
}

.ceidg-catalog .smart-select-trigger i {
    color: #96702d !important;
}

.ceidg-catalog .smart-select {
    position: relative;
    display: block;
    min-width: 0;
}

/* Status importu */

html body .ceidg-import-state {
    padding: 14px 18px !important;
    margin: 0 0 18px !important;
    background: #fff9eb !important;
    border: 1px solid #e6d5b3;
    border-left: 3px solid #c6a46a;
}

.ceidg-import-state > span {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ceidg-import-state b {
    color: #795b25 !important;
    font-size: 13px;
}

.ceidg-import-state small {
    color: #795b25 !important;
    font-size: 12px;
}

.ceidg-import-state i {
    width: 8px;
    height: 8px;
    background: #c6a46a;
}

/* LISTA PRZEDSIEBIORCOW */

html body .ceidg-catalog-list {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 12px !important;
}

html body article.ceidg-catalog-row {
    display: grid !important;
    grid-template-columns:
        48px minmax(0,1.5fr) minmax(220px,1fr) auto !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100% !important;
    padding: 20px !important;
    margin: 0 !important;
    background: #fff !important;
    border: 1px solid #dce4ee !important;
    border-left: 3px solid #c6a46a !important;
    box-shadow: none !important;
}

html body article.ceidg-catalog-row:hover {
    background: #f8fafc !important;
    border-color: #c6a46a !important;
}

.ceidg-catalog-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #eef2f7 !important;
    color: #96702d !important;
}

.ceidg-catalog-icon svg {
    width: 25px;
    height: 25px;
}

.ceidg-catalog-main {
    min-width: 0;
}

.ceidg-catalog-main > small {
    display: inline-block;
    padding: 4px 8px;
    background: #eef2f7;
    color: #475569 !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
}

.ceidg-catalog-main h3 {
    font-family: "Inter","Segoe UI",Arial,sans-serif !important;
    color: #142641 !important;
    font-size: 17px !important;
    line-height: 1.45;
    font-weight: 600;
    margin: 8px 0 5px !important;
    overflow-wrap: anywhere;
}

.ceidg-catalog-main p,
.ceidg-catalog-main address {
    color: #64748b !important;
    font-size: 12px !important;
    line-height: 1.6;
    font-style: normal;
    margin: 2px 0 !important;
    overflow-wrap: anywhere;
}

/* Dane identyfikacyjne */

html body .ceidg-catalog-row dl {
    display: grid !important;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
    margin: 0 !important;
    padding: 12px !important;
    background: #f5f7fa;
    min-width: 0;
}

.ceidg-catalog-row dl > div {
    min-width: 0;
}

.ceidg-catalog-row dt {
    color: #64748b !important;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ceidg-catalog-row dd {
    color: #142641 !important;
    font-size: 12px;
    font-weight: 600;
    margin: 0 !important;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

html body .ceidg-catalog-row > a.btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px !important;
    background: #142641 !important;
    color: #fff !important;
    border: 1px solid #142641 !important;
    font-size: 12px !important;
    white-space: normal;
    text-decoration: none !important;
}

/* Paginacja */

html body nav[data-ceidg-pages] {
    display: flex !important;
    justify-content: center !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px !important;
    padding: 22px 0 0 !important;
    margin-top: 20px !important;
    border-top: 1px solid #dce4ee;
}

nav[data-ceidg-pages] > span {
    color: #142641 !important;
    font-size: 14px;
}

html body nav[data-ceidg-pages] button {
    background: #fff !important;
    color: #142641 !important;
    border: 1px solid #cbd5e1 !important;
    min-height: 42px;
}

nav[data-ceidg-pages] button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* Przelacznik rejestrow */

.register-switcher-control {
    margin: 16px 0;
}

html body .register-switcher-control button {
    background: #fff !important;
    color: #142641 !important;
    border: 1px solid #dce4ee !important;
    padding: 12px 18px !important;
}

.register-switcher-control button > span {
    color: #96702d !important;
    font-weight: 700;
}

html body .register-view-switcher:not([hidden]) {
    display: grid !important;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 10px;
    padding: 16px;
    background: #fff;
    border: 1px solid #dce4ee;
}

html body .register-view-switcher[hidden] {
    display: none !important;
}

.register-view-switcher > a {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    padding: 16px !important;
    background: #f5f7fa !important;
    color: #142641 !important;
    border: 1px solid #dce4ee;
}

.register-view-switcher > a.active {
    border-left: 3px solid #c6a46a;
    background: #eaf0f6 !important;
}

.register-view-switcher > a svg {
    color: #96702d;
    width: 26px;
    height: 26px;
}

.register-view-switcher > a b {
    color: #142641 !important;
}

.register-view-switcher > a small {
    color: #64748b !important;
    font-size: 11px;
    overflow-wrap: anywhere;
}

/* Pozostale rejestry */

html body .public-register-layout {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 280px;
    gap: 20px;
    padding: 20px;
    background: #f5f7fa;
}

html body .public-register-grid {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}

html body .public-register-card {
    display: grid !important;
    grid-template-columns: 38px minmax(0,1fr) 20px;
    align-items: start;
    gap: 14px;
    padding: 20px !important;
    background: #fff !important;
    color: #142641 !important;
    border: 1px solid #dce4ee !important;
}

.public-register-card.active {
    border-left: 3px solid #c6a46a !important;
}

.public-register-card svg {
    color: #96702d !important;
}

.public-register-card h2 {
    font-family: Georgia,serif;
    font-size: 19px !important;
    color: #142641 !important;
    line-height: 1.4;
}

.public-register-card p {
    color: #64748b !important;
    font-size: 13px;
}

.public-register-card small {
    color: #96702d !important;
    font-weight: 700;
}

.public-register-card footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.public-register-card footer em {
    padding: 5px 8px;
    background: #eef2f7;
    color: #142641 !important;
    font-size: 10px;
    font-style: normal;
}

.register-workflow,
.register-identifier-guide {
    padding: 20px !important;
    margin-bottom: 16px;
    background: #fff !important;
    color: #142641 !important;
    border: 1px solid #dce4ee;
    border-top: 3px solid #c6a46a;
}

.register-workflow h2,
.register-identifier-guide h2 {
    color: #142641 !important;
    font-family: Georgia,serif;
    font-size: 22px;
}

.register-workflow ol {
    list-style: none;
    padding: 0;
}

.register-workflow li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #dce4ee;
}

.register-workflow li b {
    color: #96702d;
    font-size: 18px;
}

/* RESPONSYWNOSC */

@media (max-width: 1300px) {

    html body article.ceidg-catalog-row {
        grid-template-columns: 44px minmax(0,1fr) auto !important;
    }

    html body .ceidg-catalog-row dl {
        grid-column: 2 / -1;
        grid-row: 2;
    }

    html body .ceidg-catalog-row > a.btn {
        grid-column: 3;
        grid-row: 1;
    }

    html body .ceidg-catalog form[data-ceidg-form] {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }
}

@media (max-width: 1000px) {

    html body .public-register-layout {
        grid-template-columns: minmax(0,1fr);
    }

    html body .register-view-switcher:not([hidden]) {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}

@media (max-width: 700px) {

    html body section.ceidg-catalog[data-ceidg-catalog],
    html body .public-register-search {
        padding: 16px !important;
    }

    html body .public-register-search .public-register-form,
    html body .public-register-scope,
    html body .ceidg-catalog form[data-ceidg-form],
    html body .public-register-grid {
        grid-template-columns: minmax(0,1fr) !important;
    }

    html body article.ceidg-catalog-row {
        grid-template-columns: 36px minmax(0,1fr) !important;
        gap: 12px !important;
        padding: 14px !important;
    }

    html body .ceidg-catalog-row dl,
    html body .ceidg-catalog-row > a.btn {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }

    html body .register-view-switcher:not([hidden]) {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .ceidg-catalog-icon {
        width: 36px;
        height: 36px;
    }
}

