/* WebixTheme_Purple.css - Misty Lavender Only */

.webix_icon_btn .fa, .webix_icon_btn .fas { margin-right: 8px; }
.webix_message_area { z-index: 20000 !important; }

.theme-misty {
    background-color: #f4f1fa;
    --theme-accent: #b39ddb;
    --theme-accent-hover: #9575cd;
    --theme-surface: #ede7f6;
    --theme-surface-hover: #e0d7f0;
    --theme-text: #673ab7;
    --theme-border: #d1c4e9;
}

.theme-misty .webix_view.webix_control.webix_el_button button {
    background: #b39ddb;
    color: #ffffff;
    border-radius: 8px;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(179,157,219,0.28);
}

/* 確保 button 裡頭的圖示為白色，解決預設看不到的問題 */
.theme-misty .webix_view.webix_control.webix_el_button button .fa,
.theme-misty .webix_view.webix_control.webix_el_button button .fas {
    color: #ffffff !important;
}

.theme-misty .webix_view.webix_control.webix_el_button button:hover {
    background: #9575cd;
}

.theme-misty .webix_toolbar {
    background: #ede7f6;
    color: #673ab7;
    border-bottom: 3px solid #b39ddb;
    border-top-left-radius: 10px; /* 增加上方圓角 */
    border-top-right-radius: 10px;
}

.theme-misty .webix_el_label {
    color: #673ab7;
    font-weight: 600;
}

.theme-misty .webix_fieldset {
    border: none;
    background: transparent;
    overflow: visible; /* 確保內部邊框不被裁切 */
}

.theme-misty .webix_fieldset > fieldset {
    border: 1px solid #d1c4e9;
    border-left: 4px solid #b39ddb;
    border-radius: 10px;
    background: #faf9ff;
    padding: 8px 10px 10px;
    margin: 2px 1px 1px 0; /* 增加上方與右下邊距，避免邊框被容器裁切 */
}

.theme-misty .webix_fieldset_label {
    color: #673ab7;
    background: #faf9ff;
    padding: 0 8px;
    font-weight: 600;
    text-transform: none;
}

.theme-misty .webix_forminput > fieldset {
    padding: 0;
}

.theme-misty .webix_el_richselect input,
.theme-misty .webix_el_combo input,
.theme-misty .webix_el_text input {
    border: 1px solid #d1c4e9;
    border-radius: 6px;
}

/* 強化標籤中的圖示間距 */
.theme-misty .webix_el_label .fa, .theme-misty .webix_el_label .fas,
.theme-misty .webix_fieldset_label .fa, .theme-misty .webix_fieldset_label .fas,
.theme-misty .webix_hcell .fa, .theme-misty .webix_hcell .fas {
    margin-right: 2px;
    width: auto;
    text-align: center;
}

/* Sidebar / sidemenu: replace Webix default blue with misty purple accents */
.theme-misty .my_sidemenu.webix_view,
.theme-misty .my_sidemenu .webix_view {
    background: #fbf9fe;
}

.theme-misty .my_sidemenu {
    border-right: 1px solid #ddd6e8;
    box-shadow: 8px 0 24px rgba(92, 68, 136, 0.12);
}

.theme-misty .my_sidemenu .webix_sidebar {
    background: linear-gradient(180deg, #fcfbff 0%, #f6f1fb 100%);
}

.theme-misty .my_sidemenu .webix_tree_leaves {
    background: transparent;
}

.theme-misty .my_sidemenu .webix_tree_item,
.theme-misty .my_sidemenu .webix_list_item {
    color: #4d4268;
    border-left: 4px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.theme-misty .my_sidemenu .webix_tree_item .menu-icon,
.theme-misty .my_sidemenu .webix_list_item .menu-icon,
.theme-misty .my_sidemenu .webix_sidebar_selected .menu-icon,
.theme-misty .my_sidemenu .webix_selected .menu-icon {
    color: #4f4569;
}

.theme-misty .my_sidemenu .webix_tree_item:hover,
.theme-misty .my_sidemenu .webix_list_item:hover,
.theme-misty .my_sidemenu .webix_tree_item:focus,
.theme-misty .my_sidemenu .webix_list_item:focus {
    background: #f3eefb;
    border-left-color: #c8b5e8;
    color: #4d4268;
}

.theme-misty .my_sidemenu .webix_sidebar_selected,
.theme-misty .my_sidemenu .webix_selected,
.theme-misty .my_sidemenu .webix_tree_item.webix_selected,
.theme-misty .my_sidemenu .webix_list_item.webix_selected {
    background: #ece3f8 !important;
    border-left-color: #9b6fd3 !important;
    color: #4a3574 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.theme-misty .my_sidemenu .webix_sidebar_selected .menu-icon,
.theme-misty .my_sidemenu .webix_selected .menu-icon,
.theme-misty .my_sidemenu .webix_tree_item.webix_selected .menu-icon,
.theme-misty .my_sidemenu .webix_list_item.webix_selected .menu-icon,
.theme-misty .my_sidemenu .webix_sidebar_selected .menu-text,
.theme-misty .my_sidemenu .webix_selected .menu-text,
.theme-misty .my_sidemenu .webix_tree_item.webix_selected .menu-text,
.theme-misty .my_sidemenu .webix_list_item.webix_selected .menu-text {
    color: #4a3574 !important;
}

.theme-misty .my_sidemenu .webix_tree_branch_1 .webix_tree_item {
    background: rgba(255, 255, 255, 0.45);
}

.theme-misty .my_sidemenu .webix_tree_branch_1 .webix_tree_item:hover {
    background: #f0eafb;
}

.theme-misty .my_sidemenu .webix_sidebar_dir,
.theme-misty .my_sidemenu .webix_tree_open,
.theme-misty .my_sidemenu .webix_tree_close {
    color: #8d74b4;
}

.theme-misty .my_sidemenu .webix_sidebar_dir:hover,
.theme-misty .my_sidemenu .webix_tree_open:hover,
.theme-misty .my_sidemenu .webix_tree_close:hover {
    color: #7557aa;
}

.theme-misty .my_sidemenu .version-footer {
    border-top: 1px solid #ddd6e8 !important;
    background: linear-gradient(180deg, rgba(250, 247, 254, 0.92) 0%, rgba(242, 235, 250, 0.98) 100%);
    color: #6e5a95;
}

/* Generic list selection states used in dialogs/forms */
.theme-misty .webix_list .webix_list_item {
    color: #4d4268;
    border-left: 3px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.theme-misty .webix_list .webix_list_item:hover,
.theme-misty .webix_list .webix_list_item:focus {
    background: #f4effb;
    border-left-color: #ccb8ea;
    color: #4d4268;
}

.theme-misty .webix_list .webix_list_item.webix_selected,
.theme-misty .webix_list .webix_list_item.webix_selected:focus,
.theme-misty .webix_list .webix_list_item.webix_selected:hover {
    background: #ece3f8 !important;
    border-left-color: #9b6fd3 !important;
    color: #4a3574 !important;
}
