
/* ==================================================
   PRAWNIKOM PRO — SAMODZIELNE MODULY FUNKCJONALNE
   ================================================== */

.pp-pro-root[data-pro-standalone] {
    --pro-navy: #142641;
    --pro-gold: #c6a46a;
    --pro-border: #d7e0eb;
    --pro-muted: #64748b;
    --pro-bg: #f1f5f9;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    color: var(--pro-navy);
}

#main-content:has(.pp-pro-standalone),
.pp-pro-root[data-pro-standalone] .pp-pro-standalone,
.pp-pro-standalone .pp-pro-drawer-body,
.pp-pro-standalone .pp-pro-drawer-view {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

.pp-pro-standalone *,
.pp-pro-standalone *::before,
.pp-pro-standalone *::after {
    box-sizing: border-box;
}

.pp-pro-standalone {
    padding: 20px;
    background: #f1f5f9;
}

/* IKONY */

.pp-pro-standalone svg.pp-pro-icon {
    display: inline-block;
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #b28a47;
}

/* POWROT */

.pp-pro-standalone .pp-pro-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 18px;
    background: white !important;
    border: 1px solid #d7e0eb !important;
    border-radius: 0 !important;
    color: #142641 !important;
}

/* NAGLOWEK FUNKCJI */

.pp-pro-standalone .pp-pro-feature-head {
    display: grid !important;
    grid-template-columns: 80px minmax(0,1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 32px;
    margin: 0 0 24px;
    background: linear-gradient(120deg,#101c30,#203957);
    border-bottom: 3px solid #c6a46a;
    color: white;
}

.pp-pro-feature-head > span:first-child {
    display: grid;
    place-items: center;
    width: 80px;
    height: 80px;
    background: #ffffff09;
    border: 1px solid #c6a46a66;
}

.pp-pro-standalone .pp-pro-feature-head > span:first-child svg {
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    color: #e0bd7d;
}

.pp-pro-feature-head h2 {
    margin: 6px 0 10px !important;
    font: 400 clamp(28px,3vw,42px)/1.2 Georgia,serif;
    color: white !important;
}

.pp-pro-feature-head p {
    margin: 0;
    color: #cbd5e1 !important;
    font-size: 15px;
}

.pp-pro-standalone .pp-pro-kicker {
    color: #d6b474 !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.pp-pro-feature-head .pp-pro-feature-metric {
    display: block;
    padding: 18px 24px;
    background: #ffffff0a;
    border: 1px solid #c6a46a;
    color: #e0bd7d;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
}

/* OBSZAR ROBOCZY */

.pp-pro-standalone .pp-pro-workbench {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(250px,300px);
    align-items: start;
    gap: 22px;
    width: 100%;
    min-width: 0;
}

.pp-pro-standalone .pp-pro-workbench-main,
.pp-pro-standalone .pp-pro-workbench-side {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
}

.pp-pro-standalone .pp-pro-workbench-main,
.pp-pro-standalone .pp-pro-workbench-side > section {
    background: #fff;
    border: 1px solid #d7e0eb;
    border-top: 3px solid #c6a46a;
    border-radius: 0 !important;
    padding: 24px;
}

.pp-pro-workbench-side {
    display: grid;
    gap: 20px;
}

/* TYTULY SEKCJI */

.pp-pro-standalone .pp-pro-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid #d7e0eb;
}

.pp-pro-section-head small,
.pp-pro-list > header small {
    display: block;
    color: #96702d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.pp-pro-standalone h3 {
    font-family: Georgia,serif;
    font-size: 23px;
    font-weight: 400;
    color: #142641;
    margin: 5px 0;
}

/* PRZELACZNIK */

.pp-pro-standalone .pp-pro-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    background: #f1f5f9 !important;
    border: 1px solid #d7e0eb !important;
    color: #64748b !important;
    border-radius: 0 !important;
}

.pp-pro-toggle > span {
    display: block;
    position: relative;
    width: 38px;
    height: 20px;
    background: #cbd5e1;
    border-radius: 20px;
}

.pp-pro-toggle > span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
}

.pp-pro-toggle[aria-checked="true"] > span {
    background: #15803d;
}

.pp-pro-toggle[aria-checked="true"] > span::after {
    left: 21px;
}

/* FORMULARZE */

.pp-pro-standalone .pp-pro-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.pp-pro-standalone .pp-pro-field,
.pp-pro-standalone .pp-pro-note,
.pp-pro-standalone .pp-pro-list-filters label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #142641;
}

.pp-pro-standalone input:not([type="checkbox"]):not([type="radio"]),
.pp-pro-standalone select,
.pp-pro-standalone textarea,
.pp-pro-standalone .smart-select-trigger {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 46px;
    padding: 12px 14px !important;
    background: #f7f9fc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0 !important;
    font: 400 14px "Segoe UI",Arial,sans-serif;
    color: #142641 !important;
    box-shadow: none !important;
}

.pp-pro-standalone textarea {
    min-height: 120px;
    resize: vertical;
}

.pp-pro-standalone input:focus,
.pp-pro-standalone textarea:focus,
.pp-pro-standalone select:focus {
    border-color: #c6a46a !important;
    outline: 1px solid #c6a46a;
}

/* SMART SELECT — BEZ PODWOJNEGO POLA */

.pp-pro-standalone .smart-select {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.pp-pro-standalone .smart-select:has(> .smart-select-trigger)
> select[data-smart-select-ready="1"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    clip-path: inset(50%);
    pointer-events: none;
}

.pp-pro-standalone .smart-select-trigger {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.pp-pro-standalone .smart-select-trigger i {
    color: #96702d;
    font-style: normal;
}

/* PRZYCISKI */

.pp-pro-standalone .pp-pro-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0 28px;
}

.pp-pro-standalone button {
    border-radius: 0 !important;
}

.pp-pro-standalone [data-pro-save-note] {
    background: white !important;
    border: 1px solid #c6a46a !important;
    color: #142641 !important;
}

.pp-pro-standalone [data-pro-run] {
    background: #142641 !important;
    border: 1px solid #142641 !important;
    color: white !important;
}

.pp-pro-standalone [data-pro-run]:hover {
    background: #203957 !important;
}

/* KOLEJKA OPERACYJNA */

.pp-pro-standalone .pp-pro-list {
    width: 100%;
    min-width: 0;
    border: 1px solid #d7e0eb;
    background: white;
}

.pp-pro-list > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid #d7e0eb;
}

.pp-pro-list > header > b {
    padding: 8px 12px;
    background: #f1f5f9;
    color: #142641;
    font-size: 12px;
}

.pp-pro-standalone .pp-pro-list-filters {
    display: grid;
    grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) minmax(0,1fr);
    gap: 12px;
    padding: 18px;
    background: #f1f5f9;
    border-bottom: 1px solid #d7e0eb;
}

.pp-pro-list-filters .field-suggest {
    position: relative;
    width: 100%;
    min-width: 0;
}

.pp-pro-standalone .pp-pro-list-rows {
    display: grid;
    gap: 0;
    min-width: 0;
}

.pp-pro-standalone [data-pro-list-row]:not([hidden]) {
    display: grid !important;
    grid-template-columns: 95px minmax(0,1fr) 120px auto;
    align-items: center;
    gap: 14px;
    padding: 18px;
    min-width: 0;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.pp-pro-standalone [data-pro-list-row]:hover {
    background: #f7f9fc;
}

.pp-pro-list-rows article > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.pp-pro-list-rows article time {
    font-size: 12px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.pp-pro-list-rows article b {
    color: #142641;
    font-size: 14px;
}

.pp-pro-list-rows article > div > span {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 5px;
}

/* STATUSY ZADAN */

.pp-pro-list-rows article em {
    padding: 7px 9px;
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    background: #f1f5f9;
    color: #475569;
}

.pp-pro-list-rows [data-status="W toku"] em {
    background: #e8f0ff;
    color: #1d4ed8;
}

.pp-pro-list-rows [data-status="Do akceptacji"] em {
    background: #f2eafb;
    color: #6b21a8;
}

.pp-pro-list-rows [data-status="Oczekuje"] em {
    background: #fef3c7;
    color: #92400e;
}

.pp-pro-list-rows [data-status="Zakończone"] em {
    background: #dcfce7;
    color: #166534;
}

.pp-pro-standalone .pp-pro-row-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #d7e0eb;
    color: #142641 !important;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
}

.pp-pro-row-open:hover {
    background: #142641;
    color: white !important;
}

/* PAGINACJA */

.pp-pro-list > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px;
    background: #f7f9fc;
    color: #64748b;
    font-size: 13px;
}

.pp-pro-list > footer button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* CHECKLISTA */

.pp-pro-standalone .pp-pro-checklist {
    display: grid;
    gap: 10px;
}

.pp-pro-checklist label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d7e0eb;
    background: #f7f9fc;
    font-size: 14px;
    cursor: pointer;
}

.pp-pro-checklist input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    accent-color: #142641;
}

.pp-pro-checklist label:has(input:checked) {
    background: #edf7ef;
    border-color: #86b994;
    color: #166534;
}

/* HISTORIA OPERACJI */

.pp-pro-standalone .pp-pro-history {
    padding: 16px;
    background: #f7f9fc;
    border-left: 3px solid #c6a46a;
    color: #64748b;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.pp-pro-history p {
    margin: 0;
}

/* LINKI I UKRYTE ELEMENTY */

.pp-pro-standalone a {
    text-decoration: none !important;
}

.pp-pro-standalone [hidden] {
    display: none !important;
}

/* TABLET */

@media(max-width:1250px) {
    .pp-pro-standalone .pp-pro-workbench {
        grid-template-columns: minmax(0,1fr);
    }

    .pp-pro-workbench-side {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

/* TELEFON */

@media(max-width:768px) {
    .pp-pro-standalone {
        padding: 12px;
    }

    .pp-pro-standalone .pp-pro-feature-head {
        grid-template-columns: 50px minmax(0,1fr);
        padding: 20px;
        gap: 14px;
    }

    .pp-pro-feature-head > span:first-child {
        width: 50px;
        height: 50px;
    }

    .pp-pro-feature-head .pp-pro-feature-metric {
        grid-column: 1/-1;
        font-size: 18px;
    }

    .pp-pro-standalone .pp-pro-workbench-main,
    .pp-pro-standalone .pp-pro-workbench-side > section {
        padding: 16px;
    }

    .pp-pro-workbench-side,
    .pp-pro-standalone .pp-pro-list-filters {
        grid-template-columns: minmax(0,1fr);
    }

    .pp-pro-standalone [data-pro-list-row]:not([hidden]) {
        grid-template-columns: minmax(0,1fr) auto;
        gap: 10px;
    }

    .pp-pro-list-rows article time,
    .pp-pro-list-rows article > div {
        grid-column: 1/-1;
    }

    .pp-pro-standalone .pp-pro-actions button {
        width: 100%;
    }

    .pp-pro-list > footer {
        justify-content: center;
    }
}

