/* CONNECTOR_PROJECT_CONTROLLING_DESKTOP_V1 */

.pc-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:18px;
}

.pc-header h1{
    margin:0 0 8px;
    color:#0f172a;
}

.pc-header-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.pc-header-actions button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    min-height:44px;

    margin:0;
    padding:11px 15px;

    border:0;
    border-radius:12px;

    background:#2563eb;
    color:#ffffff;

    font-weight:900;
    cursor:pointer;
}

.pc-generated-at{
    color:#64748b;
    font-size:12px;
    font-weight:800;
}

.pc-summary{
    display:grid;
    grid-template-columns:
        repeat(
            6,
            minmax(0,1fr)
        );

    gap:12px;
    margin-bottom:18px;
}

.pc-summary article{
    min-width:0;

    padding:15px;

    border:1px solid #e2e8f0;
    border-radius:17px;

    background:#ffffff;

    box-shadow:
        0 8px 22px
        rgba(15,23,42,0.06);
}

.pc-summary span{
    display:block;

    color:#64748b;

    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:0.04em;
}

.pc-summary strong{
    display:block;

    margin-top:7px;

    color:#0f172a;

    font-size:21px;
    line-height:1.15;

    overflow-wrap:anywhere;
}

.pc-summary .attention{
    border-top:4px solid #f59e0b;
}

.pc-summary .result{
    border-top:4px solid #8b5cf6;
}

.pc-summary .receivables{
    border-top:4px solid #ef4444;
}

.pc-panel{
    padding:16px;

    border:1px solid #e2e8f0;
    border-radius:20px;

    background:#ffffff;

    box-shadow:
        0 10px 26px
        rgba(15,23,42,0.06);
}

.pc-filters{
    display:grid;

    grid-template-columns:
        minmax(230px,1.6fr)
        repeat(
            5,
            minmax(145px,1fr)
        )
        46px;

    gap:9px;
    margin-bottom:14px;
}

.pc-filters input,
.pc-filters select{
    width:100%;
    min-width:0;
    min-height:44px;

    padding:10px 12px;

    box-sizing:border-box;

    border:1px solid #cbd5e1;
    border-radius:12px;

    background:#f8fafc;
}

.pc-filters button{
    width:46px;
    height:44px;

    margin:0;
    padding:0;

    border:0;
    border-radius:12px;

    background:#0f172a;
    color:#ffffff;
}

.pc-table-wrap{
    overflow:auto;

    border:1px solid #e5e7eb;
    border-radius:15px;
}

.pc-table{
    min-width:1780px;

    margin:0;

    border-radius:0;
    box-shadow:none;
}

.pc-table td small,
.pc-table td strong{
    display:block;
}

.pc-table td small{
    max-width:230px;

    margin-top:4px;

    color:#64748b;

    white-space:normal;
}

.pc-clickable-row{
    cursor:pointer;
}

.pc-money{
    font-weight:900;
    white-space:nowrap;
}

.pc-money.positive,
.positive{
    color:#166534 !important;
}

.pc-money.negative,
.negative{
    color:#b91c1c !important;
}

.pc-money.warning{
    color:#b45309;
}

.pc-project-status{
    display:inline-flex;

    padding:6px 9px;

    border-radius:999px;

    background:#e2e8f0;
    color:#334155;

    font-size:11px;
    font-weight:900;
}

.pc-status{
    display:inline-flex;
    align-items:center;

    width:max-content;
    max-width:170px;

    padding:7px 10px;

    border-radius:999px;

    font-size:11px;
    font-weight:900;
    line-height:1.2;
    text-align:center;
}

.pc-status.good{
    background:#dcfce7;
    color:#166534;
}

.pc-status.warning{
    background:#fef3c7;
    color:#92400e;
}

.pc-status.danger{
    background:#fee2e2;
    color:#b91c1c;
}

.pc-status.closed{
    background:#e0e7ff;
    color:#3730a3;
}

.pc-status.neutral{
    background:#e2e8f0;
    color:#475569;
}

.pc-open-button{
    display:grid;
    place-items:center;

    width:38px;
    height:38px;

    margin:0;
    padding:0;

    border:0;
    border-radius:10px;

    background:#2563eb;
    color:#ffffff;
}

.pc-mobile-list{
    display:none;
}

.pc-modal-box{
    width:min(1220px,96vw);
    max-height:94vh;

    padding:0;
    gap:0;

    overflow:hidden;
}

.pc-modal-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;

    padding:18px 20px;

    background:
        linear-gradient(
            135deg,
            #0f172a,
            #1e3a8a
        );

    color:#ffffff;
}

.pc-modal-header h2{
    margin:5px 0 0;

    color:#ffffff;
    font-size:21px;
}

.pc-modal-header-main{
    min-width:0;
}

.pc-modal-header-main .pc-status{
    margin-bottom:5px;
}

.pc-modal-close{
    display:grid;
    place-items:center;

    width:42px;
    height:42px;

    margin:0;
    padding:0;

    border:0;
    border-radius:12px;

    background:
        rgba(
            255,
            255,
            255,
            0.14
        );

    color:#ffffff;
}

.pc-modal-scroll{
    min-height:0;

    padding:18px;

    overflow:auto;

    background:#f8fafc;
}

.pc-sheet-loading,
.pc-sheet-error,
.pc-sheet-empty{
    padding:28px;

    color:#64748b;

    text-align:center;
}

.pc-sheet-error{
    color:#b91c1c;
}

.pc-sheet-summary{
    display:grid;

    grid-template-columns:
        repeat(
            6,
            minmax(0,1fr)
        );

    gap:11px;
    margin-bottom:15px;
}

.pc-sheet-metric{
    display:flex;
    align-items:flex-start;
    gap:10px;

    min-width:0;

    padding:14px;

    border:1px solid #e2e8f0;
    border-radius:15px;

    background:#ffffff;
}

.pc-sheet-metric > i{
    display:grid;
    place-items:center;

    width:37px;
    height:37px;
    flex:0 0 37px;

    border-radius:11px;

    background:#dbeafe;
    color:#1d4ed8;
}

.pc-sheet-metric span,
.pc-sheet-metric strong,
.pc-sheet-metric small{
    display:block;
}

.pc-sheet-metric span{
    color:#64748b;

    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
}

.pc-sheet-metric strong{
    margin-top:4px;

    color:#0f172a;

    font-size:17px;

    overflow-wrap:anywhere;
}

.pc-sheet-metric small{
    margin-top:4px;

    color:#64748b;

    font-size:10px;
    line-height:1.3;
}

.pc-sheet-metric.danger{
    border-color:#fecaca;
    background:#fff7f7;
}

.pc-sheet-metric.danger > i{
    background:#fee2e2;
    color:#b91c1c;
}

.pc-sheet-columns{
    display:grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );

    gap:13px;
    margin-bottom:14px;
}

.pc-sheet-section,
.pc-sheet-detail{
    padding:15px;

    border:1px solid #e2e8f0;
    border-radius:17px;

    background:#ffffff;
}

.pc-sheet-section h3,
.pc-sheet-detail h3{
    display:flex;
    align-items:center;
    gap:8px;

    margin:0 0 12px;

    color:#0f172a;
    font-size:16px;
}

.pc-sheet-data-grid{
    display:grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );

    gap:8px;
}

.pc-sheet-data-pair{
    display:grid;
    gap:3px;

    min-width:0;

    padding:10px;

    border-radius:11px;

    background:#f8fafc;
}

.pc-sheet-data-pair span{
    color:#64748b;

    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
}

.pc-sheet-data-pair strong{
    color:#0f172a;

    font-size:14px;

    overflow-wrap:anywhere;
}

.pc-sheet-detail{
    margin-bottom:12px;
}

.pc-sheet-list{
    display:grid;
    gap:7px;
}

.pc-sheet-list-row{
    display:grid;

    grid-template-columns:
        minmax(0,1fr)
        auto;

    gap:14px;
    align-items:center;

    padding:10px 12px;

    border:1px solid #e2e8f0;
    border-radius:11px;

    background:#ffffff;
}

.pc-sheet-list-row small,
.pc-sheet-list-row strong,
.pc-sheet-list-row span{
    display:block;
}

.pc-sheet-list-row small{
    color:#64748b;

    font-size:10px;
    font-weight:900;
    text-transform:uppercase;
}

.pc-sheet-list-row strong{
    margin-top:2px;

    color:#0f172a;

    overflow-wrap:anywhere;
}

.pc-sheet-list-row span{
    margin-top:3px;

    color:#64748b;

    font-size:11px;
}

.pc-sheet-list-row b{
    color:#0f172a;

    white-space:nowrap;
}

.pc-modal-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;

    padding:14px 18px;

    border-top:1px solid #e2e8f0;

    background:#ffffff;
}

.pc-modal-actions button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    min-height:44px;

    margin:0;
    padding:10px 14px;

    border:0;
    border-radius:11px;

    font-weight:900;
}

.pc-modal-actions .secondary{
    background:#e2e8f0;
    color:#334155;
}

.pc-modal-actions .primary{
    background:#2563eb;
    color:#ffffff;
}

@media(max-width:1350px){

    .pc-summary{
        grid-template-columns:
            repeat(
                3,
                minmax(0,1fr)
            );
    }

    .pc-filters{
        grid-template-columns:
            repeat(
                3,
                minmax(0,1fr)
            );
    }

    .pc-filters button{
        width:100%;
    }

    .pc-sheet-summary{
        grid-template-columns:
            repeat(
                3,
                minmax(0,1fr)
            );
    }
}

@media(max-width:768px){

    .pc-header{
        flex-direction:column;
        align-items:stretch;
    }

    .pc-header-actions{
        display:grid;
        grid-template-columns:1fr;
    }

    .pc-header-actions button{
        width:100%;
    }

    .pc-summary{
        grid-template-columns:
            1fr
            !important;
    }

    .pc-summary article{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:12px;
    }

    .pc-summary strong{
        margin:0;

        text-align:right;
        font-size:19px;
    }

    .pc-panel{
        padding:12px;
    }

    .pc-filters{
        grid-template-columns:
            1fr
            !important;
    }

    .pc-filters button{
        width:100%;
    }

    .pc-table-wrap{
        display:none;
    }

    .pc-mobile-list{
        display:grid;
        gap:12px;
    }

    .pc-mobile-card{
        min-width:0;

        padding:15px;

        border:1px solid #e2e8f0;
        border-left:5px solid #2563eb;
        border-radius:18px;

        background:#ffffff;

        box-shadow:
            0 7px 20px
            rgba(15,23,42,0.07);
    }

    .pc-mobile-head{
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:10px;
    }

    .pc-mobile-head > div{
        min-width:0;
    }

    .pc-mobile-head small,
    .pc-mobile-head strong,
    .pc-mobile-head span{
        display:block;
    }

    .pc-mobile-head small{
        color:#64748b;
        font-size:11px;
    }

    .pc-mobile-head strong{
        margin-top:3px;

        color:#0f172a;

        overflow-wrap:anywhere;
    }

    .pc-mobile-head span{
        margin-top:3px;

        color:#64748b;
        font-size:12px;
    }

    .pc-mobile-grid{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;

        margin:13px 0;
    }

    .pc-mobile-grid > div{
        display:grid;
        gap:3px;

        min-width:0;

        padding:9px;

        border-radius:11px;

        background:#f8fafc;
    }

    .pc-mobile-grid span{
        color:#64748b;

        font-size:10px;
        font-weight:900;
        text-transform:uppercase;
    }

    .pc-mobile-grid strong{
        font-size:13px;

        overflow-wrap:anywhere;
    }

    .pc-mobile-footer{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:10px;

        color:#64748b;

        font-size:11px;
    }

    .pc-mobile-footer button{
        margin:0;
        padding:9px 12px;

        border:0;
        border-radius:10px;

        background:#2563eb;
        color:#ffffff;

        font-weight:900;
    }

    #project-controlling-modal{
        align-items:flex-end;

        padding:0;
    }

    .pc-modal-box{
        width:100%;
        max-width:100vw;
        height:100dvh;
        max-height:100dvh;

        margin:0;

        border-radius:0;
    }

    .pc-modal-header{
        padding-top:
            calc(
                14px
                +
                env(safe-area-inset-top)
            );
    }

    .pc-modal-scroll{
        padding:12px;
    }

    .pc-sheet-summary,
    .pc-sheet-columns,
    .pc-sheet-data-grid{
        grid-template-columns:
            1fr
            !important;
    }

    .pc-sheet-list-row{
        grid-template-columns:1fr;
    }

    .pc-sheet-list-row b{
        white-space:normal;
    }

    .pc-modal-actions{
        display:grid;
        grid-template-columns:1fr 1fr;

        padding-bottom:
            calc(
                12px
                +
                env(safe-area-inset-bottom)
            );
    }

    .pc-modal-actions button{
        width:100%;
    }
}

/* CONNECTOR_STAGE_02_1_CONTROLLING_CSS_V1 */

.pc-summary{
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        )
        !important;

    align-items:stretch;
}

.pc-summary article{
    min-height:78px;
}

.pc-filters{
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        )
        !important;
}

.pc-filters
#project-controlling-search{
    grid-column:span 2;
}

.pc-filters button{
    width:100% !important;
}

.pc-table-wrap{
    overflow-x:hidden !important;
}

.pc-table{
    width:100% !important;
    min-width:0 !important;

    table-layout:fixed;
}

.pc-table col:nth-child(1){
    width:18%;
}

.pc-table col:nth-child(2){
    width:17%;
}

.pc-table col:nth-child(3){
    width:13%;
}

.pc-table col:nth-child(4){
    width:11%;
}

.pc-table col:nth-child(5){
    width:16%;
}

.pc-table col:nth-child(6){
    width:10%;
}

.pc-table col:nth-child(7){
    width:15%;
}

.pc-table th,
.pc-table td{
    min-width:0;

    padding:
        13px
        11px;

    white-space:normal !important;
    overflow-wrap:anywhere;
    vertical-align:top;
}

.pc-table th{
    font-size:11px;
}

.pc-project-cell strong,
.pc-project-cell span,
.pc-project-cell small,
.pc-client-cell strong,
.pc-client-cell span,
.pc-status-cell small{
    display:block;
}

.pc-project-cell span,
.pc-client-cell span,
.pc-status-cell small{
    margin-top:4px;

    color:#64748b;

    font-size:11px;
    line-height:1.35;
}

.pc-project-cell small{
    margin-top:7px;

    color:#475569;

    font-size:10px;
}

.pc-manager-cell strong{
    display:block;

    line-height:1.4;
}

.pc-status-cell
.pc-project-status{
    max-width:100%;

    white-space:normal;
    text-align:center;
}

.pc-compact-line{
    display:grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    gap:6px;
    align-items:baseline;

    padding:
        4px
        0;

    border-bottom:
        1px
        solid
        #eef2f7;
}

.pc-compact-line:last-child{
    border-bottom:0;
}

.pc-compact-line small{
    color:#64748b;

    font-size:9px;
    font-weight:900;

    text-transform:uppercase;
}

.pc-compact-line strong{
    color:#0f172a;

    font-size:12px;
    text-align:right;

    white-space:nowrap;
}

.pc-compact-line strong.warning{
    color:#b45309;
}

.pc-row-actions{
    display:flex;

    align-items:center;
    justify-content:space-between;

    gap:7px;

    margin-top:8px;
}

.pc-row-actions
.pc-status{
    max-width:
        calc(
            100%
            -
            45px
        );

    white-space:normal;
}

.pc-row-actions button{
    display:inline-flex;

    align-items:center;
    justify-content:center;

    gap:6px;

    min-width:38px;
    min-height:38px;

    margin:0;

    padding:
        8px
        10px;

    border:0;
    border-radius:10px;

    background:#2563eb;
    color:#ffffff;

    font-weight:900;
}

.pc-row-actions button span{
    display:none;
}

@media(max-width:1200px){

    .pc-summary{
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            )
            !important;
    }

    .pc-filters{
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            )
            !important;
    }

    .pc-filters
    #project-controlling-search{
        grid-column:span 2;
    }

    .pc-table-wrap{
        display:none !important;
    }

    .pc-mobile-list{
        display:grid !important;

        gap:12px;
    }
}

@media(max-width:768px){

    .pc-summary,
    .pc-filters{
        grid-template-columns:
            1fr
            !important;
    }

    .pc-filters
    #project-controlling-search{
        grid-column:auto;
    }
}

/* CONNECTOR_STAGE_03_BUDGET_BASELINES_CONTROLLING_CSS_V1 */
.pc-row-actions{
    flex-wrap:wrap;
}

.pc-finance-cell .pc-compact-line:nth-child(3) strong{
    font-size:11px;
}

@media(max-width:768px){
    .pc-modal-actions{
        grid-template-columns:1fr!important;
    }
}
