@charset "utf-8";

.display-none{
    display:none !important;
}

.import-display{
     display:none;
}

.content-header {
  padding: 12px .5rem;
}

.content-header h1{
    font-size: 1.5rem;
}

/* sidebar樣式 */
/* .sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active, .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
  background-color: #000000;
  color: #fff;
} */

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active, 
.sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
  background-color: transparent;
} 

/* [class*="sidebar-dark-"] .nav-treeview > .nav-item > .nav-link.active, [class*="sidebar-dark-"] .nav-treeview > .nav-item > .nav-link.active:focus, [class*="sidebar-dark-"] .nav-treeview > .nav-item > .nav-link.active:hover {
  background-color: transparent;
  color: #fff;
  font-weight: 600;
} */

.nav-sidebar .nav-item > .nav-link {
  display: block;
  padding: .3rem 1rem;
}

.nav-sidebar .nav-item > .nav-link {
  margin-bottom: .1rem;
}

[class*="sidebar-dark-"] .nav-treeview > .nav-item > .nav-link {
  color: #c2c7d0;
  /* padding-left: 25px; */
  padding: .3rem 1rem .3rem 1.5rem;
}

[class*="sidebar-dark-"] .nav-treeview > .nav-item > .nav-link.active, 
[class*="sidebar-dark-"] .nav-treeview > .nav-item > .nav-link.active:focus, 
[class*="sidebar-dark-"] .nav-treeview > .nav-item > .nav-link.active:hover {
  background-color: transparent;
  color: #fff;
  /* font-weight: 600; */
}

.content-header h1 small{
    font-size: 15px;
    display: inline-block;
    padding-left: 4px;
    font-weight: 300;
}

/* 列表table樣式 */
.table-custom thead tr{
    /* background-color: #3c8dbc; */
    background-color: #216389;
    color: #fff;
}

.table-custom td, .table-custom thead th {
  vertical-align: middle;
}

.w-50{
    width: 50px;
}

.w-60{
    width: 60px;
}

.w-80{
    width: 80px;
}

.w-100{
    width: 100px;
}

.w-120{
    width: 120px;
}

.w-140{
    width: 140px;
}

.w-160{
    width: 160px;
}

.bg-color1{
    background-color: #216389;
    color: white;
}

.bg-color2{
    background-color: #99daff;
    color: white;
}

.l-space-3{
    letter-spacing:3px;
}

.f-center{
    text-align: center;
}

.lab-tag{
    display: inline-block;
    padding: .25em .4em;
    font-size: 90%;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

/* 驗證碼 */
.mews-captcha{
    display: flex;
    padding: 5px 0px;
    gap: 10px;
}
.mews-captcha img, .mews-captcha input{
    flex: 1;            /* 平均分配空間 */
    max-width: 50%;     /* 保證不超過一半寬度 */
    box-sizing: border-box;
}


.list-img-preview{
    max-width: 200px;
}


/* 圖片上傳 */
.w-300{width:300px !important;}
.w-50{width:50px !important;}

.image-upload-container {
    width: 320px;
    /* margin: 20px auto; */
    padding: 0px;
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
}

.image-upload-container .image-upload-label {
    display: inline-block;
    padding: 5px 10px;
    background-color: #3490dc;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
}

.image-upload-container .image-upload-label:hover {
    background-color: #2779bd;
}

.image-upload-container .image-remove-label {
    display: inline-block;
    padding: 5px 10px;
    background-color: #F0C420;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
}

.image-upload-container .image-remove-label:hover {
    background-color: #E6B800;
}

.image-upload-container .image-preview-wrapper{
    width: 100%;
}

.image-upload-container .image-frame {
    position: relative; /* 讓刪除按鈕絕對定位相對此容器 */
    margin-top: 15px;
    width: 300px;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    justify-content: center; /* X方向 */
    align-items: center; /* Y方向 */
    overflow: hidden;
    background-color: #fafafa;
}

.image-upload-container .image-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;/* 保持比例、不裁切 */
    border-radius: 6px;
    display: block;
}

.image-upload-container .img-tips{
    padding: 0px 5px;
    color:#d9534f;
}

/* 檔案上傳 */

.file-upload-container {
    display: flex;
    align-items: center;     /* 垂直置中 */
    /* justify-content: center;  */
    /* width: 500px; */
    /* margin: 20px auto; */
    padding: 0px;
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    gap:10px;
}

.file-upload-container .file-upload-label {
    display: inline-block;
    padding: 5px 10px;
    background-color: #3490dc;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
    margin: 0;
}

.file-upload-container .file-open-label{
    display: inline-block;
    padding: 5px 10px;
    background-color: #05bd0e;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
    margin: 0;
}

.file-upload-container .file-open-label:hover {
    background-color: #06d110;
}

.file-upload-container .file-upload-label:hover {
    background-color: #2779bd;
}

.file-upload-container .file-remove-label {
    display: inline-block;
    padding: 5px 10px;
    background-color: #F0C420;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
    margin: 0;
}

.file-upload-container .file-remove-label:hover {
    background-color: #E6B800;
}



/* .preview-wrapper button#remove-image {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 26px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-wrapper button#remove-image:hover {
    background: rgba(0,0,0,0.8);
} */

/* 多圖上傳 */
.mult-imgs-upload-container{
    width: 100%;
    padding: 0px;
}


.mult-imgs-upload-container .mult-imgs-upload-label {
    display: inline-block;
    padding: 5px 10px;
    background-color: #3490dc;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
}

.mult-imgs-upload-container .mult-imgs-upload-label:hover {
    background-color: #2779bd;
}

.mult-imgs-upload-container .mult-imgs-preview-wrapper{
    display: flex;
    padding: 10px 0;
    width: 100%;
    justify-content:flex-start;
    flex-wrap: wrap;

}

.mult-imgs-upload-container .mult-imgs-box{
    width: 250px;
    border: 2px solid #ccc;
    /* height: 300px; */
    padding: 10px;
    margin: 5px;
}

.mult-imgs-upload-container .mult-imgs-frame {
    width: 230px;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    justify-content: center; /* X方向 */
    align-items: center; /* Y方向 */
    overflow: hidden;
    background-color: #fafafa;
    margin-bottom: 5px;
}

.mult-imgs-upload-container .mult-imgs-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;/* 保持比例、不裁切 */
    border-radius: 6px;
    display: block;
}

.mult-imgs-upload-container .mult-imgs-box input{
    margin-bottom: 5px;
}

.mult-imgs-operate{
    display: flex;
    /* justify-content: space-between; */
}

.mult-imgs-operate input{
    /* width: 100px; */
    width: 50%;
    margin-right: 10px;
}

.mult-imgs-upload-container .mult-imgs-remove-label {
    /* display: inline-block; */
    display: flex;
    align-items: center;     /* 垂直置中 */
    justify-content: center; /* 水平置中 (可選) */
    width: 50%;
    padding: 5px 10px;
    background-color: #F0C420;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    /* text-align: center; */
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
}

.mult-imgs-upload-container .mult-imgs-remove-label:hover {
    background-color: #E6B800;
}



/* 多檔案上傳 */
.mult-files-upload-container{
    width: 100%;
    padding: 0px;
}


.mult-files-upload-container .mult-files-upload-label {
    display: inline-block;
    padding: 5px 10px;
    background-color: #3490dc;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
}

.mult-files-upload-container .mult-files-upload-label:hover {
    background-color: #2779bd;
}

.mult-files-upload-container .mult-files-preview-wrapper{
    display: flex;
    padding: 10px 0;
    width: 100%;
    justify-content:flex-start;
    flex-wrap: wrap;

}

.mult-files-upload-container .mult-files-box{
    width: 250px;
    border: 2px solid #ccc;
    /* height: 300px; */
    padding: 10px;
    margin: 5px;
}

/* .mult-files-upload-container .mult-files-frame {
    width: 230px;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #fafafa;
    margin-bottom: 5px;
}

.mult-files-upload-container .mult-files-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    display: block;
} */

.mult-files-upload-container .mult-files-box p{
    padding: 5px 0;
    margin: 0;
}

.mult-files-upload-container .mult-files-box input{
    margin-bottom: 5px;
}

.mult-files-operate{
    display: flex;
    /* justify-content: space-between; */
}

.mult-files-operate input{
    width: 50%;
    margin-right: 10px;
}

.mult-files-upload-container .mult-files-remove-label {
    /* display: inline-block; */
    display: flex;
    align-items: center;     /* 垂直置中 */
    justify-content: center; /* 水平置中 (可選) */
    width: 50%;
    padding: 5px 10px;
    background-color: #F0C420;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 5px rgb(0 0 0 / 0.2);
}

.mult-files-upload-container .mult-files-remove-label:hover {
    background-color: #E6B800;
}


/* 編輯表單表格 */

    table.form-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
        font-family: "Microsoft JhengHei", sans-serif;
        font-size: 14px;
    }
    table.form-table th,
    table.form-table td {
        padding: 10px 12px;
        border: 1px solid #dee2e6;
        vertical-align: middle;
    }
    table.form-table th {
        background-color: #f8f9fa;
        text-align: right;
        width: 25%;
        white-space: nowrap;
    }
    table.form-table tr.section-header td {
        /* background-color: #216389;
        color: white; */
        font-weight: bold;
        text-align: left;
        font-size: 16px;
        padding: 8px 10px;
    }

    table.form-table .td-title{
        width: 200px;
        background-color: #f8f9fa;
    }

    /* table.form-table tr td:first-child {
        background-color: #f0f0f0;
    } */

    /* === 表單元素樣式 === */
    table.form-table input[type="text"],
    table.form-table input[type="email"],
    table.form-table select,
    table.form-table textarea {
        width: 100%;
        padding: 6px 8px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
        font-size: 14px;
        transition: border-color 0.2s, box-shadow 0.2s;
    }

    table.form-table input:focus,
    table.form-table select:focus,
    table.form-table textarea:focus {
        border-color: #216389;
        box-shadow: 0 0 3px rgba(33, 99, 137, 0.4);
        outline: none;
    }

    /* === textarea 特別設定 === */
    table.form-table textarea {
        resize: vertical; /* 允許垂直縮放 */
        min-height: 60px;
        line-height: 1.5;
    }

    /* === Radio & Checkbox 群組 === */
    .form-radio-group,
    .form-checkbox-group {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        align-items: center;
    }
    .form-checkbox-group label,
    .form-radio-group label {
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 3px;
    }

    /* === 補充樣式 === */
    .text-red {
        color: #d9534f;
        font-size: 12px;
        margin-top: 3px;
        display: block;
    }


    /* 權限表格 */
    table.perms-table {
        width: 80%;
        table-layout: fixed;
      
    }

    table.perms-table th {
        text-align: left;
        background-color: #b3cae6;
    }

    table.perms-table th:first-child {
        width: 150px;
    }

    table.perms-table label{
        margin: 0;
    }



    /* 清單表格 */
    table.list-table {
        table-layout: fixed;
        width: 80%;
        border-collapse: collapse;
        font-family: Arial, sans-serif;
        margin: 20px 0;
    }

    table.list-table th,
    table.list-table td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: center;
    }

    table.list-table thead th {
        background-color: #f2f2f2;
        color: #333;
        font-weight: bold;
    }

    table.list-table tr:hover {
        background-color: #f9f9f9;
    }

    table.list-table input[type="text"] {
        width: 95%;
        padding: 5px;
        border: 1px solid #ccc;
        border-radius: 4px;
        box-sizing: border-box;
    }

    table.list-table > thead th:first-child,  table.list-table > tbody td:first-child{
        width: 10%;
        min-width: 80px;
        /* background: red; */
    }


    .list-add-btn {
        background-color: #f39c12;
        /* background-color: #e74c3c; */
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.2s ease;
        width: 80px;
    }

    .list-add-btn:hover {
        background-color: #f39c12;
        /* background-color: #c0392b; */
    }

    .list-del-btn {
        background-color: #e74c3c;
        color: white;
        border: none;
        padding: 6px 12px;
        border-radius: 4px;
        cursor: pointer;
        transition: background-color 0.2s ease;
        max-width: 80px;
    }

    .list-del-btn:hover {
        background-color: #c0392b;
    }


