/**
 * 이 파일은 계약관리모듈의 일부입니다. (https://www.imodules.io)
 *
 * 계약관리모듈관리 패널을 정의한다.
 *
 * @file /modules/naddle/contract/admin/styles/Admin.css
 * @author sungjin <esung246@naddle.net>
 * @license MIT License
 * @modified 2026. 10. 16.
 */
aui-component[data-type='panel'][data-variant='viewer'][data-name='Contracts'] {
    aui-component[data-type='panel'][data-variant='view'] {
        aui-component[data-type='panel'][data-variant='grid'] {
            div[data-model='table'][data-role='body'] {
                div[data-model='table'][data-role='column'] {
                    > div.types {
                        > label {
                            display: inline-block;
                            width: var(--aui-font-size-extra-large);
                            margin-right: var(--aui-component-inset);
                            text-align: center;
                            border-radius: var(--aui-component-inset);
                            color: var(--aui-white-primary);
                            font-weight: 900;

                            &.REVIEW {
                                background: #e3f2fd;
                                color: var(--aui-black-secondary);
                                border: 0.5px solid var(--aui-black-tertiary);
                            }

                            &.INTRO {
                                background: #bbdefb;
                                color: var(--aui-black-secondary);
                            }

                            &.DELIVERY {
                                background: #90caf9;
                                color: var(--aui-black-secondary);
                            }

                            &.BIDDING {
                                background: #64b5f6;
                            }

                            &.PROGRESS {
                                background: #42a5f5;
                            }

                            &.CONTRACT_COMPLETED {
                                background: #187ccb;
                            }

                            &.BUSINESS_COMPLETED {
                                background: #1565c0;
                            }

                            &.HOLD {
                                background: #a1a1a1;
                            }

                            &.LOST {
                                background: #795548;
                            }

                            &.CANCELED {
                                background: #636363;
                            }

                            &.BUILD {
                                background: #4caf50;
                            }

                            &.ADDITIONAL_DEV {
                                background: #2196f3;
                            }

                            &.CLOUD {
                                background: #ff9800;
                            }

                            &.MAINTENANCE {
                                background: #9c27b0;
                            }

                            &.LICENSE {
                                background: #607d8b;
                            }

                            &.OUTSOURCED_OPERATION {
                                background: #ffc107;
                            }

                            &.RESEARCH_CONTRACT {
                                background: #00bcd4;
                            }

                            &.HW_EQUIPMENT {
                                background: #3f51b5;
                            }

                            &.LOST {
                                background: #795548;
                            }

                            &.OTHER_SERVICE {
                                background: #ff0000;
                            }
                        }
                    }
                }
            }
        }

        aui-component[data-type='panel'][data-variant='panel'] {
            > div[data-role='container'] {
                > div[data-role='header'] {
                    > aui-component[data-type='toolbar'] {
                        > div[data-role='container'] {
                            > div[data-role='content'] {
                                > aui-component[data-type='button'] {
                                    &.toggle {
                                        > div[data-role='container'] {
                                            > div[data-role='content'] {
                                                > button {
                                                    background: var(--aui-brand-primary);
                                                    color: var(--aui-white-primary);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                > div[data-role='content'] {
                    > aui-component[data-type='panel'][data-variant='tab'] {
                        aui-component[data-type='panel'][data-variant='panel'][data-name='messages'] {
                            aui-component[data-type='panel'][data-variant='panel'] {
                                > div[data-role='container'] {
                                    > div[data-role='content'] {
                                        > div[data-role='messages'] {
                                            display: flex;
                                            flex-direction: column;
                                            gap: var(--aui-line-height-small);

                                            > div[data-role='message'] {
                                                > div[data-role='header'] {
                                                    display: flex;
                                                    align-items: center;

                                                    > span[data-role='name'] {
                                                        display: flex;
                                                        flex: 1;
                                                        align-items: center;
                                                        gap: var(--aui-component-gap);
                                                        font-weight: 700;

                                                        > i {
                                                            width: var(--aui-component-height-small);
                                                            height: var(--aui-component-height-small);
                                                        }
                                                    }

                                                    > time {
                                                        flex-shrink: 0;
                                                        color: var(--aui-text-tertiary);
                                                        font-size: var(--aui-font-size-small);
                                                    }

                                                    > button {
                                                        background: var(--aui-danger-primary);
                                                        border: 0;
                                                        width: var(--aui-line-height-large);
                                                        height: var(--aui-line-height-large);
                                                        border-radius: calc(var(--aui-component-inset) / 2);
                                                        cursor: pointer;
                                                        color: var(--aui-white-primary);
                                                        margin-left: var(--aui-component-gap);

                                                        &:disabled {
                                                            background: var(--aui-danger-tertiary);
                                                        }
                                                    }
                                                }

                                                > div[data-role='content'] {
                                                    border-radius: var(--aui-component-inset);
                                                    margin-top: var(--aui-component-gap);
                                                    margin-left: calc(
                                                        var(--aui-component-height-small) + var(--aui-component-gap)
                                                    );
                                                    padding: var(--aui-line-height-small);
                                                    background: var(--aui-border-quaternary);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

dialog[data-type='panel'][data-variant='window'] {
    .contract-update {
        color: var(--aui-danger-primary) !important;
    }

    aui-component[data-type='field'][data-variant='set'][data-role='grid'][data-name='prev_documents'] {
        aui-component[data-type='panel'][data-variant='grid'] {
            div[data-model='table'][data-role='body'] {
                div[data-model='table'][data-role='row'] {
                    div[data-model='table'][data-view] {
                        > span.cancel {
                            color: var(--aui-danger-primary);
                        }
                    }
                }
            }
        }
    }
}
