:root {
    /*색상변수*/
    --em-panel: #ffffff;
    --em-border: #e5eaf2;
    --em-text: #1f2937;
    --em-muted: #6b7280;
    --em-blue: #2563eb;
    --em-green: #16a34a;
    --em-red: #dc2626;
    --em-amber: #d97706;
    --em-purple: #7c3aed;

    --color-prometheus: #d96a4a;
    --color-kafka: #4b5563;
    --color-ceph: #060505;
    --color-airflow: #00c7d4;
    --color-spark: #d97706;
    --color-trino: #c026d3;
    --color-argo: #FF723E;

    
}

.total-monitoring {
    color: var(--em-text);
    padding-bottom: 42px;
    min-width: 1320px;
    min-height: 0;
    height: 100%;


    /* 페이지 타이틀 */
    .em-title-wrap {
        position: relative;

        h1 {
            margin: 0;
            font-size: 28px;
            letter-spacing: -0.04em;
            color: #111827;
        }

        p {
            margin: 7px 0 0;
            font-size: 14px;
            color: var(--em-muted);
        }
    }

    /* 콘텐츠 영역 */
    .em-cont-area {
        display: flex;
        flex-direction: column;
        gap: 24px;

        /* 카드 공통스타일 */
        .em-card {
            background: var(--em-panel);
            border: 1px solid var(--em-border);
            border-radius: 14px;
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
            padding: 24px;
            display: flex;
            flex-direction: column;
            gap: 16px;

            .card-title-wrap {
                display: flex;
                flex-direction: column;
                gap: 4px;

                h6 {
                    font-size: 15px;
                    padding-bottom: 4px;
                }

                .info-box {
                    padding: 8px 12px;
                    background-color: #f5f7fa;
                    border-left: 4px solid var(--em-border);
                    border-radius: 4px;

                    span {
                        font-size: 13px;
                    }
                }

                &.dir-row {
                    display: flex;
                    flex-direction: row;
                    justify-content: space-between;
                    align-items: center;
                }
            }

            &.summary {
                padding: 20px;
                border-top: 6px solid var(--em-border);
                .text-box {

                    .label {
                        font-size: 15px;
                        color: #374151;


                    }

                    .desc {
                        font-size: 13px;
                        color: var(--em-muted);
                    }
                }

                .val-box {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 16px;

                    &.grid {
                        display: grid;
                        grid-template-columns: repeat(2, minmax(0, 1fr));
                        gap: 16px;
                        height: 100%;
                    }


                    .val-item {
                        text-align: center;
                        display: flex;
                        flex-direction: column;
                        align-items: center;

                        .value {
                            font-size: 20px;
                            font-weight: 900;
                            color: var(--em-text);


                            &.point {
                                color: #c03c14;    
                            }

                            &.safe,
                            &.successs{
                                color: var(--em-green);
                            }

                            &.warning{
                                color: var(--em-amber);
                            }

                            &.fail{
                                color: var(--em-red);
                            }

                            &.process{
                                color: var(--em-blue);
                            }

                            &#kafkaTotalMsgAndSizeSummary{
                                text-align: right;

                                small{
                                    font-size: 13px;
                                    font-weight: 500;
                                    color: var(--em-muted);
                                    padding-right: 8px;
                                    display: inline-block;
                                    line-height: 28px;
                                    vertical-align: top;
                                }
                            }
                        }

                        .label {
                            font-size: 13px;
                            color: var(--em-muted);
                        }
                    }
                }
            }



        }
    }


    /* 배지 공통스타일 */
    .badge {
        display: inline-block;
        line-height: 1;
        border-radius: 50px;
        padding: 4px 8px;
        font-size: 12px;
        font-weight: 600;
        margin-top: 2px;

        &.prometheus {
            background-color: rgba(217, 106, 74, 0.1);
            color: var(--color-prometheus);
        }

        &.kafka {
            background-color: rgba(255, 255, 255, 1);
            color: var(--color-kafka);
            border: 1px solid var(--em-border);
        }

        &.ceph {
            background-color: rgba(6, 5, 5, 0.1);
            color: var(--color-ceph);
        }

        &.airflow {
            background-color: rgba(0, 199, 212, 0.1);
            color: var(--color-airflow);
        }


        &.spark {
            background-color: rgba(217, 119, 6, 0.1);
            color: var(--color-spark);
        }

        &.trino {
            background-color: rgba(192, 38, 211, 0.1);
            color: var(--color-trino);
        }

        &.argo {
            background-color: rgba(255, 114, 62, 0.1);
            color: var(--color-argo);
        }
    }

    .em-summary-grid {
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 12px;
        margin-left: 0;
    }

    .row {
        flex: 1;

        &.grid-1-1 {
            display: grid;
            grid-template-columns: 6fr 3fr;
            gap: 16px;
        }

        .inner {
            height: 100%;
            display: flex;
            flex-direction: column;

            .sub-title-wrap {
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding-bottom: 14px;


                .tit-box {
                    display: flex;
                    align-items: center;
                    gap: 4px;

                    .ico {
                        width: 24px;
                        height: 24px;
                        fill: none;
                        stroke: currentColor;
                        stroke-width: 2;
                        stroke-linecap: round;
                        stroke-linejoin: round;
                    }

                    .h3 {
                        font-size: 18px;
                    }

                }
            }

            .card-group {
                flex: 1;
                display: grid;
                gap: 16px;

                &.col1-2 {
                    grid-template-columns: 1fr 2fr;
                }

                &.col2 {
                    grid-template-columns: repeat(2, minmax(0, 1fr));
                }

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


                &.col4 {
                    grid-template-columns: repeat(4, minmax(0, 1fr));
                }


                &.col3-1 {
                    grid-template-columns: 3fr 1fr;
                }

                &.col3-2 {
                    grid-template-columns: 3fr 2fr;
                }
            }

        }
    }



    /* 테이블 공통 스타일 */
    .em-table-wrap {
        width: 100%;
        overflow-x: auto;
        border: 1px solid var(--em-border);
        border-radius: 12px;

        .em-table {
            width: 100%;
            border-collapse: collapse;
            background: #ffffff;
            table-layout: fixed;

            tr {

                th,
                td {
                    text-align: center;
                }

                th {
                    height: 34px;
                    padding: 0 10px;
                    background: #f8fafc;
                    border-bottom: 1px solid var(--em-border);
                    font-size: 12px;
                    font-weight: 900;
                    color: #64748b;
                    white-space: nowrap;
                    position: sticky;
                    top: 0;
                }

                td {
                    height: 36px;
                    padding: 0 10px;
                    border-bottom: 1px solid #eef2f7;
                    font-size: 12px;
                    color: #374151;
                    white-space: nowrap;

                    &.normal {
                        font-weight: 900;
                        color: var(--em-green);
                    }

                    &.warning {
                        font-weight: 900;
                        color: var(--em-amber);
                    }
                }

                &:last-child {
                    td {
                        border-bottom: 0;
                    }
                }

                &:hover {
                    td {
                        background: #f9fafb;
                    }
                }
            }

        }

    }

    /* 단계별 배포 및 자원 사용 현황 */
    .resources-summary {
        flex: 1;
        gap: 16px;
        margin-left: 0;

        .em-card {
            &.selected {
                border: 1px solid var(--em-blue);
                background-color: rgba(37, 99, 235, 0.1);
            }

            &:hover:not(.selected) {
                cursor: pointer;
                background-color: #f9fafb;
            }

            .data-wrap {
                display: flex;
                align-items: flex-end;
                justify-content: space-between;

                .left {
                    p {
                        font-size: 13px;
                        color: var(--em-muted);
                    }
                }

                .right {
                    display: flex;
                    flex-direction: column;
                    gap: 4px;
                    width: 100%;

                    .text-box {
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        width: 100%;

                        .value {
                            font-size: 18px;
                            font-weight: 900;
                            text-align: right;
                            width: 100%;

                            small {
                                font-size: 12px;
                                color: var(--em-muted);
                                font-weight: 400;
                                display: block;
                            }
                        }

                        .label {
                            font-size: 13px;
                            color: var(--em-muted);
                        }
                    }
                }


            }
        }
    }

    .use-list-wrap {
        flex: 1;

        .data-wrap {
            height: 306px;
            padding-top: 14px;

            .em-table-wrap {
                height: 100%;
                max-height: 100%;
            }
        }
    }

    .resources-setting-wrap {
        width: 100%;

        .fieldset {
            padding-top: 14px;

            .form-group {
                padding-bottom: 12px;

                .form-tit {
                    label {
                        font-size: 13px;
                    }
                }

                input {
                    width: 100%;
                    margin-top: 4px;
                }
            }

        }

        button {
            border-radius: 4px;
            background: var(--em-blue);
            color: #fff;
            font-size: 14px;
            padding: 8px 10px;
            outline: none;
            float: right;
            border: none;

            &:hover {
                cursor: pointer;
                background-color: #1a48ad;
            }
        }
    }




}




body {
    .side-modal-wrap {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100;

        .dim {
            opacity: 1;
            visibility: visible;
            background-color: rgba(31, 41, 55, .5);
            width: 100vw;
            height: 100vh;
            transition: opacity .35s ease, visibility .35s ease;
        }


        .side-modal {
            background-color: #fff;
            width: 600px;
            height: 100%;
            position: fixed;
            top: 0;
            right: 0;
            transition: transform .5s ease;
            transform: translateX(0);
            transition-delay: .12s;

            .tit-area {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;

                h6 {
                    font-size: 15px;
                }

                .side-modal-close {
                    width: 28px;
                    height: 28px;
                    border-radius: 4px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border: none;
                    background: #ffffff;
                    outline: none;

                    &:hover {
                        background: #f8fafc;
                        cursor: pointer;
                    }

                    .ico {
                        display: inline-block;
                        width: 16px;
                        height: 16px;

                        svg {
                            fill: var(--em-text);
                            stroke: var(--em-text);

                        }
                    }
                }

            }
        }
    }
}