:root {
    --lang-show: en;
    --font-family: "Noto Sans TC", sans-serif;
    --font-size: 14px;
    --font-size-ModuleHeader: 24px;
    --font-size-SubModuleHeader: 16px;
    --font-size-menu: 16px;
    --font-size-menu-icon: 24px;
    --font-size-button: 18px;
    --font-size-linkbutton: 24px;
    --font-color-menu: white;
    /*--color-core: #af002a;*/
    --color-core: #167d77;
    --color-menu-background: #384859;
    /*--color-menu-item: #FFB   FB3;*/
    --color-menu-item: #FFFFFF;
    --color-menu-item-hover: var(--color-core);
    --color-background: lightgray;
    --color-module-background: white;
    --color-field-background: #E8F0FE;
    --color-header: silver;
    --color-container: var(--color-background);
    --color-treeview: #f8f8ff;
    --color-button: var(--color-core);
    --color-button-border: silver;
    --color-button-hover: var(--color-core);
    --color-list-hover: #FFEE99;
    --color-input-background: #ffffff;
    --color-valid: #1eb300;
    --color-required: #ff0000;
    --color-readonly: #d0d3d4;
    --color-disabled: #FFEE99;
    --color-option: var(--border-color);
    --border-radius: 0px;
    --border-color: #a9a9a9;
    --font-color-option: #2e5894;
    --doc-tree-width: 300px;
    --doc-main-width: 100%;
    --header-height: 50px;
    --order-header-width: 33%;
    --order-header-height: 160px;
    --order-payment-width: 66%;
    --order-detail-width: 100%;
    --order-detail-height: calc(100vh - var(--header-height) - var(--order-header-height) - var(--order-remark-height) - 80px);
    --order-remark-width: 100%;
    --order-remark-height: 50px;
    --icon-size: 28px;
    --col-seq-width: 50px;
    --col-item-width: auto;
    --col-month-width: 80px;
    --col-unitprice-width: 100px;
    --col-discount-width: 100px;
    --col-qty-width: 80px;
    --col-amount-width: 120px;
    --col-tools-width: 80px;
    --editlayer-width: 600px;
}

/* Base Style */

body {
    background-color: var(--color-background);
    font-family: var(--font-family);
    font-size:var(--font-size);
    width: 100vw;
    height: 100vh;
    padding: 0px;
    margin: 0px;
    display: inline-block;
    overflow: hidden;
}

.container {
    background-color: var(--color-background);
    display: inline-flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    overflow-y:auto;
}

/* width */
::-webkit-scrollbar {
    width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 3px var(--border-color);
    border-radius: 2px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: steelblue;
    border-radius: 2px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: green;
}

label {
    height: 24px;
    line-height: 24px;
}

/*label::before, span::before {
    font-family: "material symbols outlined";*/
    /*font-size: var(--icon-size);*/
    /*vertical-align: middle;
    content: attr(icon);
}*/

:required, .required {
    border-color: var(--color-required);
    color: var(--color-required);
}

:required {
    border: 0.5px solid red;
}

:disabled {
    background-color: var(--color-disabled);
}

#wrapper {
    width: 100vw;
    height: 100vh;
    background-color: black;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    opacity: 0.5;
}

.list_detail > .inactive {
    color:red;
}

@keyframes appear {
    from {opacity:0;scale: 0.4;}
    to {opacity: 1;scale: 1;}
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 100;}
}

@keyframes from-right {
    from {right: -100%;}
    to {right: 0%;}
}

@keyframes from-left {
    from {left: -100%;}
    to {left: 0%;}
}

@keyframes from-top {
    from {top: -100%;}
    to {top: 0%;}
}

@keyframes from-bottom {
    from {bottom: -100%;}
    to {bottom: 0%;}
}

#editlayer {
    display: flex;
    position: absolute;
    flex-direction: row;
    align-items: baseline;
    z-index: 101;
    width: 90vw;
    height: 90vh;
    max-height: 90vh;
    min-height: 90vh;
    min-width: 90vw;
    max-width: 90vw;
    top: 0;
    left: 0;
    margin: 5vh 5vw;
/*    animation-name: fadeIn;
    animation: from-top;
    animation-duration: 0.5s;*/
    box-sizing: border-box;
    padding: 10px;
    overflow-y: auto;
    background-color:whitesmoke;
}

#editlayer > div {
    width: 100%;
/*    border: none;*/
    padding: 10px;
    margin: 10px auto;
    box-sizing: border-box;
    box-shadow: none;
}

#editlayer > div > div {
    margin-bottom: 10px;
}


#editlayer > div > div.input {
    flex-flow: row;
    margin: 0px;
}

#editlayer > div > div.input.group_header {
    border-bottom: none;
}

#editlayer > div > div.input.group_item {
    border-top: none;
    border-bottom: none;
}

#editlayer > div > div.input.group_last {
    border-top: none;
}

.group {
    width: 100%;
    max-width: unset;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    gap: 10px;
}

.group.group_header {
    border: 1px solid var(--border-color);
    padding: 0px;
    gap: 0px;
}

.group > div.input {
    flex-flow: row;
    flex: 0 1 calc(25% - 8px);
    max-width: unset;
    height: fit-content;
}

.group > div.input.skip-space {
/*  flex: 0 0 auto;*/
    visibility: hidden;
}

/* Menu Style */

.menu {
    background-color: var(--color-menu-background);
    width: 45px;
    height: auto;
    position:relative;
}

#menu_icon {
    font-size: 24px;
    color: white;
    padding: 7px;
    line-height: 50px;
    text-decoration: none;
}


.menu_title {
    background-color: var(--color-treeview);
    display: block;
    width: calc(100% - 2px);
    aspect-ratio: 4 / 3;
    margin: auto;
    vertical-align: middle;
    border: 1px solid #fff;
    align-content: space-around;
}

.logo {
    width: 90%;
    margin: auto;
    display: block;
}


.menu > ul {
    margin: 20px 0px 0px 0px;
    padding: 0px;
}

    .menu > ul > li {
        line-height: 30px;
        height: 30px;
        width: 100%;
        border-radius: 25px 0px 0px 25px;
        margin-bottom: 8px;
        overflow: hidden;
    }

        .menu > ul > li > a {
            line-height: 30px;
            /*height: 30px;*/
            color: var(--font-color-menu);
            font-size: var(--font-color-menu);
            padding-left: 10px;
            text-decoration: none;
            border-radius: 25px 0px 0px 25px;
            white-space: nowrap;
        }

            .menu > ul > li:hover,
            .menu > ul > li > a:hover,
            .menu > ul > li:hover > a,
            .menu > ul > li.selected > *,
            .menu > ul > li.selected {
                background-color: var(--font-color-menu);
                color: var(--color-core);
            }

/*            .menu > ul > li > a::before {
                font-family: "material symbols outlined";
                font-size: var(--icon-size);
                padding-right: 15px;
                vertical-align: top;
                content: attr(icon);
            }*/

/* Module Style */

.title {
    width: 100%;
    line-height: 30px;
    height: 30px;
    text-align: center;
    font-weight: 600;
    background-color: var(--color-header);
    border-radius: var(--border-radius) var(--border-radius) 0px 0px;
    margin-bottom: 5px;
}

.module_container {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background-color: #E8F0FE;
    background-color: unset;
    overflow: hidden;
}

.module {
/*    width: calc(100% - 40px);*/
    width: 100%;
    height: calc(100vh - 50px);
    /*background-color: #E8F0FE;*/
    background-color: #F0F8FF;
    margin: 0px;
    padding: 20px;
    box-sizing: border-box;
    border-radius: var(--border-radius);
}

.header {
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    background-color: var(--color-menu-background);
    min-height: var(--header-height);
    height: var(--header-height);
    width: 100%;
    vertical-align: text-top;
    z-index: 1;
    border-radius: var(--border-radius);
}

.header_pullbar {
    height: 10px;
    background-color: var(--color-header);
    border: 0px solid red;
    text-align: center;
    width: 100px;
    margin-top: -10px;
}

@media only screen and (max-width:600px) {
    .header {
        flex-flow:column;
        height: calc(var(--header-height) * 3);
        height:auto;
    }
    .header_left, .header_center, .header_right {
        text-align:center;
    }
}




.module_name {
    font-size: x-large;
    font-weight: 600;
    position: relative;
    display: block;
    white-space: nowrap;
    top: 0px;
    left: 0px;
    border: 0px solid red;
    color: black;
    float: left;
}

.module_button {
    /*line-height: 20px;*/
    /*height: 30px;*/
    text-align: right;
    width: 100%;
    display: inline-block;
    /*margin-bottom:10px;*/
    padding-bottom:10px;
    box-sizing:border-box;
    flex-flow:row;
    justify-content:space-between;
}

.module_button > button, .module_button > input[type=submit] {
    font-size: var(--font-size);
    font-weight: 400;
    color: black;
    min-width: 100px;
    height: 26px;
    margin: 5px 5px;
    line-height: 26px;
    border: 0.5px solid var(--border-color);
    border-radius: 5px;
}

/*.module_button > button::before, .module_button > input[type=submit]::before {
    font-family: "material symbols outlined";
    font-size: var(--icon-size);
    padding-right: 5px;
    vertical-align: top;
    content: attr(icon);
    color: grey;
}*/

.module_form {
    display: flex;
    width: 100%;
    overflow: hidden;
    margin: 0px 0px 0px 0px;
    height: calc(100% - 50px);
    border: 0px solid green;
    background-color: var(--color-field-background);
    background-color:unset;
}

.doc_tree {
    width: var(--doc-tree-width);
    width: 23%;
    height: calc(100% - 20px);
    border: 0px solid red;
    padding: 10px;
    background-color: transparent;
    overflow: hidden;
    float: right;
}

.tree_head {
    display: block;
    margin-top: 0px;
    width: 100%;
    line-height: 30px;
    height: 30px;
    background-color: transparent;
    border: 0px outset black;
    border-bottom: 0px solid black;
    border-radius: 5px 5px 0px 0px;
    z-index: 1;
}

.tab {
    width: calc((var(--doc-tree-width) - 10px) / 2);
    min-height: 30px;
    line-height: 28px;
    background-color: var(--color-header);
    padding: 4px 15px;
    border: 1px inset var(--border-color);
    border-radius: var(--border-radius) var(--border-radius) 0px 0px;
    cursor: pointer;
    z-index: 3;
}

.selected {
    background-color: var(--color-treeview);
    border-bottom: 1px solid var(--color-treeview);
    z-index: 4;
    cursor: default;
}

.tree_view {
    display: none;
    width: 100%;
    height: calc(100% - 50px);
    border: 1px inset var(--border-color);
    border-radius: var(--border-radius);
    border-top-left-radius: 0px;
    background-color: var(--color-treeview);
    padding: 0px;
    margin: 0px;
    overflow: hidden;
    overflow-x: auto;
    z-index: 2;
}

    .tree_view > ul {
        border: 0px;
    }

.show_div {
    display: block;
}

.tree_view > li {
    list-style: none;
    line-height: 24px;
    height: 24px;
    width: auto;
    padding: 5px;
}

    .tree_view > li:hover,
    .tree_view > li:hover > a {
        background-color: var(--font-color-option);
        color: var(--color-treeview);
    }

    .tree_view > li > a {
        line-height: 24px;
        height: 24px;
        color: var(--font-color-option);
        background-color: var(--color-treeview);
        font-size: var(--font-size);
        padding-left: 10px;
        text-decoration: none;
        border-radius: 25px 0px 0px 25px;
        white-space: nowrap;
    }

/*        .tree_view > li > a:before {
            font-family: "material symbols outlined";
            font-size: var(--icon-size);
            padding-right: 15px;
            vertical-align: top;
            content: attr(icon);
        }*/

.module_form > * button {
    height: 24px;
    line-height: 24px;
    width: 35px;
    font-size: var(--font-size-button);
    color: var(--color-treeview);
    border-radius: var(--border-radius);
    background-color: var(--color-button);
    border: 1px solid var(--color-line);
    margin: 0px 0px 0px 5px;
}

.div_table {
    width: 100%;
    height: calc(var(--order-detail-height) - 30px);
    overflow: hidden;
    overflow-y: auto;
    padding: 0px;
    border: 0px solid red;
    border-radius: 0px 0px var(--border-radius) var(--border-radius);
}

.order_remark {
    width: var(--order-remark-width);
    height: var(--order-remark-height);
    line-height: var(--order-remark-height);
    border: 0px solid blue;
    vertical-align: text-top;
    padding: 0px;
    margin: 0px;
}
/*
p {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--color-input-background);
    margin: 0px;
    padding: 0px;
    min-height: var(--order-remark-height);
    max-height: var(--order-remark-height);
    width: 100%;
}
*/
.Linkbutton {
    /*background-color: var(--color-button);*/
    background-color: #E7E9EB;
    font-size: 14px;
    padding: 2px 5px;
    line-height: 20px;
    text-decoration: none;
    width: auto;
    /*min-width: 100px;*/
    color: black;
    margin-left: 10px;
    display: inline-block;
    text-align: center;
    height: 20px;
    border-radius: 2px;
    border: 1px solid var(--color-button-border);
    white-space: nowrap;
}

.Linkbutton:hover {
    background-color: var(--color-button-hover);
    box-shadow: 1px 1px lightslategray;
}

.module_button > .Linkbutton {
    padding: 2px 10px;
    min-width: 100px;
}

.Iconbutton {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 0px;
    /*line-height: 50px;*/
    letter-spacing: normal;
    text-transform: none;
    text-decoration:none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    color: var(--color-button);
}

/*.Iconbutton::before {
    font-family: "material symbols outlined";
    font-size: 20px;
    font-weight: normal;
    vertical-align:baseline;
    content: attr(icon);
    line-height:20px;
    height:20px;
}*/

.Iconbutton:hover {
    transform: scale(1.2);
    font-weight:800;
}

.module_button > .Iconbutton {
    margin-left:15px;
}

.module_button > .Iconbutton::before {
    font-size: 32px;
}

.module_button > a {
    text-decoration: none;
}

.module_button > a:before {
    text-decoration: none;
    font-size: large;
    margin-left: 10px; 
    font-weight: 600;
}

.form_list {
    border: 1px solid darkgray;
    box-sizing: border-box;
    height:calc(100vh - 150px);
    overflow:hidden;
}

.list_header {
    width: 100%;
    display: flex;
    flex-flow: row;
    background-color: whitesmoke;
    color: steelblue;
    border: 1px solid darkgray;
    box-sizing: border-box;
    position:relative;
}

.list_header > div.input {
    flex-flow: column;
    border: none;
/*    border-top: 1px solid darkgrey;
    border-bottom: 1px solid darkgrey;*/
}

.list_header > div.input > span {
    font-weight:800;
}

.list_detail {
    display: flex;
    flex-flow: column;
    width: 100%;
    height: calc(100% - 80px);
    border: 1px solid darkgray;
    margin: 0px;
    box-sizing: border-box;
    border-radius: 0px;
    overflow:hidden;
    overflow-y: auto;
    position:relative;
}

.list_detail > * {
    color: steelblue;
    border: none;
}

.list_detail > a {
    text-decoration: none;
    background-color: whitesmoke;
}

.list_detail > a:nth-child(odd) {
    text-decoration: none;
    background-color: #E6F2FF;
}

.list_detail > a:hover {
    background-color: #FFEE99;
}

.list_detail_item {
    width: 100%;
    display: flex;
    flex-flow: row;
}

.list_detail_item > div.input {
    border: none;
}

div .input {
    display: flex;
    flex-flow: column;
    position: relative;
    margin: 0px;
    vertical-align: text-top;
    border: none;
/*    max-width: 400px;*/
    width: 100%;
    box-sizing: border-box;
    padding: 0px;
    border: 1px solid grey;
    /*background-color: #E8F0FE;*/
    align-items:center;
}

    div.input.header {
        background-color: cadetblue;
        color: white;
        width: 100%;
        max-width: unset;
        min-width: unset;
        min-height:unset;
        max-height: unset;
        height: unset;
    }

    div.input > .module_button {
        font-size: 12px;
        position: absolute;
        right: 0px;
        border: none;
        display: inline-block;
        vertical-align: baseline;
        padding: 0px 5px;
    }

    div.input.header > span:not(.input) {
        line-height:unset;
    }

    div.input > label, div.input > span:not(.input) {
        display: block;
        min-width: 100px;
        width: 100%;
        white-space: nowrap;
        padding: 10px;
        -webkit-box-sizing: border-box;
        font-size:inherit;
        flex:1;
    }

    div.input > input, div.input > select, div.input > .input, div.input > span.input {
        display: block;
        padding: 10px;
        margin: 0px;
        outline: none;
        border: 0.5px solid lightgray;
        text-decoration: none;
        width: 100%;
        -webkit-box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        font-size: inherit;
        flex:2;
    }

    div.input > span.input {
        background-color: var(--color-disabled);
        color: black;
    }

    div.input > span.input:has(input[type=checkbox]) {
        background-color: unset;
    }

    div.input > input::placeholder, div.input > .field_input::placeholder {
        color: lightgray;
    }

button, a.button {
    display: inline-block;
    width: 40%;
    min-width: 100px;
    max-width: 150px;
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #dcdcdc;
    background-color: #3085d6;
    color: ghostwhite;
    cursor: pointer;
    font-size: larger;
    font-weight:bold;
    text-decoration: none;
    text-align: center;
    box-shadow: inset 0px 1px 0px 0px #ffffff;
    z-index: 5;
    transition: box-shadow 0.2s ease-in-out;
}

button.green, a.button.green {background-color: green;}
button.red, a.button.red {background-color: red;}
button.blue, a.button.blue {background-color: #3085d6;}
button.gray, a.button.gray {background-color: gray;}

    button:hover, a.button:hover {
        box-shadow: 0 0 15px lightgrey;
    }

/*button.icon::before, a::before {
    font-family: "material symbols outlined";
    font-size: x-large;
    content: attr(icon);
    vertical-align:middle;
}*/

button.icon:hover::after, a.icon:hover::after, a.Iconbutton:hover::after, span:hover:after {
    content: attr(tips);
    font-family: "Noto Sans TC", sans-serif;
    padding: 2px 8px;
    color: black;
    position: absolute;
    font-size: 14px;
    right: 40px;
    bottom: 14px;
    white-space: nowrap;
    z-index: 301;
/*    box-shadow: 0px 0px 4px #222;
    background-image: linear-gradient(#eeeeee, #cccccc);*/
}

.icon {
    text-decoration:none;
    font-size:0px;
    line-height:36px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    transition: background-color 5000s ease-in-out 0s;
}
