@media print {
    .noprint {
        display: none;
        visibility: hidden;
    }
    th {
        text-align: left;
    }
}

input[type="datetime-local"],
input[type="date"] {
    height: 40px;
}

input[type="number"],
.el-select {
    min-width: 66px;
}

/* 覆蓋 TailwindCSS 對 el-select 的 max-width 限制 */
.el-select {
    width: 100% !important;
    max-width: none !important;
}
.el-select .el-input {
    width: 100% !important;
    max-width: none !important;
}
.el-select .el-input__wrapper {
    width: 100% !important;
    max-width: none !important;
}

/* 覆蓋 TailwindCSS 對 el-cascader 的 max-width 限制 */
.el-cascader {
    width: 100% !important;
    max-width: none !important;
}
.el-cascader .el-input {
    width: 100% !important;
    max-width: none !important;
}
.el-cascader .el-input__wrapper {
    width: 100% !important;
    max-width: none !important;
}
/* 確保在 el-form-item 和 input-group 內的 el-cascader 也是 100% 寬度 */
.el-form-item .el-cascader,
.input-group .el-cascader {
    width: 100% !important;
    flex: 1 1 auto !important;
}

.table-fixed th {
    word-break: keep-all; /* 不換行 */
    white-space: nowrap; /* 不換行 */
    height: 25px !important;
    overflow: hidden !important;
}

/* 設定表格內文字大小 */
.table td,
.table th {
    font-size: 16px !important;
}

/* 表格欄位自動撐開，不換行 */
.table-fixed {
    table-layout: auto !important;
}

.loading {
    z-index: -1;
    opacity: 0;
    transition: 0.5s;
    background: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

.loading.show {
    z-index: 200;
    opacity: 1;
}

.loading .spinner {
    animation: rotator 1.4s linear infinite;
}

.loading .path {
    stroke-dasharray: 187;
    stroke-dashoffset: 0;
    transform-origin: center;
    animation: dash 1.4s ease-in-out infinite, colors 5.6s ease-in-out infinite;
}

@keyframes rotator {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(270deg);
    }
}

@keyframes colors {
    0% {
        stroke: #4285f4;
    }

    25% {
        stroke: #de3e35;
    }

    50% {
        stroke: #f7c223;
    }

    75% {
        stroke: #1b9a59;
    }

    100% {
        stroke: #4285f4;
    }
}

@keyframes dash {
    0% {
        stroke-dashoffset: 187;
    }
    50% {
        stroke-dashoffset: 46.75;
        transform: rotate(135deg);
    }
    100% {
        stroke-dashoffset: 187;
        transform: rotate(450deg);
    }
}
/*mobile  */
@media screen and (max-width: 724px) and (min-width: 0) {
    img .mobile {
        display: block;
    }
    img .pc {
        display: none;
    }

    /* ========================================
       手機版卡片式表格 (table-pc)
       將傳統表格轉為上下排列的卡片樣式
       ======================================== */
    /* 隱藏表頭 */
    table.table-pc thead {
        display: none;
    }

    /* 表格變成 block */
    table.table-pc,
    table.table-pc tbody {
        display: block;
        width: 100%;
    }

    /* 每筆資料變成卡片 */
    table.table-pc tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 12px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    /* 每個欄位變成 flex 橫向排列（標籤:值） */
    table.table-pc td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #eee;
        text-align: right;
    }

    table.table-pc td:last-child {
        border-bottom: none;
    }

    /* 在 td 前顯示標籤（使用 data-label 屬性） */
    table.table-pc td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        text-align: left;
        margin-right: 10px;
        flex-shrink: 0;
    }

    /* 操作欄位特殊處理（置中、無標籤） */
    table.table-pc td[data-label="操作"],
    table.table-pc td[data-label=""] {
        justify-content: center;
        text-align: center;
    }

    table.table-pc td[data-label="操作"]::before,
    table.table-pc td[data-label=""]::before {
        display: none;
    }

    .allopen {
        display: block;
        padding-right: 10px;
        padding-bottom: 10px;
    }

    .table-mobile {
        display: block;
    }

    /* 收合展開按鈕 */
    .mobile-toggle-btn {
        position: absolute;
        right: 10px;
        top: 10px;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        border-radius: 50%;
        cursor: pointer;
        color: #6c757d;
        transition: all 0.2s;
    }

    .mobile-toggle-btn:hover {
        background: #e9ecef;
        color: #495057;
    }

    /* 讓 tr 變成相對定位，按鈕才能絕對定位 */
    table.table-pc tr {
        position: relative;
        padding-right: 45px;
    }
}
/*pc*/
@media screen and (min-width: 725px) {
    img .mobile {
        display: none;
    }
    img .pc {
        display: block;
    }
    .table-pc {
        display: table;
    }
    .table-mobile {
        display: none;
    }
    .allopen {
        display: none;
    }
}
.more-icon {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 10px;
}
.form-check-inline > label {
    font-weight: normal !important;
}
.modal-body iframe {
    height: calc(80vh);
}

/* 隱藏 modal 捲軸，覆蓋 adminlte.min.css 的設定 */
.modal {
    overflow: hidden !important;
}
.modal.show {
    overflow: hidden !important;
}
.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}
.modal-dialog {
    overflow: hidden !important;
    margin: 1.75rem auto !important;
}
.modal-body {
    overflow: hidden !important;
    padding: 0 !important;
}
.fixed-rightbottom {
    z-index: 999;
    position: fixed;
    bottom: 0;
    right: 0;
}

.fixed-bottom {
    position: fixed;
}
.imgcenter {
    margin-left: auto;
    margin-right: auto;
    display: block;
}
.left {
    float: left;
}
.right {
    float: right;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

th.sortable::after {
    font-family: "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    content: "\f0dc";
    margin-left: 5px;
    opacity: 0.5;
}

th.sortable:hover::after {
    opacity: 0.8;
}

/* el-pagination 套用 Bootstrap pagination 樣式 */
.el-pagination {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem;
}

.el-pagination .btn-prev,
.el-pagination .btn-next,
.el-pagination .el-pager li {
    position: relative;
    display: block;
    padding: 0.375rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
    font-size: 1rem;
    min-width: 32px;
    height: auto;
    border-radius: 0;
}

.el-pagination .btn-prev:first-child,
.el-pagination .el-pager li:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.el-pagination .btn-next:last-child,
.el-pagination .el-pager li:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.el-pagination .btn-prev:hover,
.el-pagination .btn-next:hover,
.el-pagination .el-pager li:hover {
    z-index: 2;
    color: #0056b3;
    text-decoration: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.el-pagination .el-pager li.active,
.el-pagination .el-pager li.is-active {
    z-index: 3;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.el-pagination .btn-prev:disabled,
.el-pagination .btn-next:disabled,
.el-pagination .el-pager li.disabled {
    color: #6c757d;
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: #dee2e6;
}

.el-pagination .el-pager {
    display: flex;
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.form-group.row .el-form-item {
    margin-bottom: 0;
}