﻿.modal-dialog {
    overflow-y: initial !important
}

.modal-dialog-scrollable {
    height: 80vh;
    overflow-y: auto;
}

.modal-dialog-fullscreen {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important; /* 原本是 92% */
    margin: 0 !important;
    padding: 0 !important;
}

.modal-dialog-fullscreen-content {
    height: 100% !important; /* 原本是 99% */
    min-height: 100% !important;
    max-height: 100% !important;
    border: none !important;
    border-radius: 0 !important;
}

.font-xs {
    font-size: 85% !important
}

.font-sm {
    font-size: 95% !important
}

.font-md {
    font-size: 130% !important
}

.font-lg {
    font-size: 160% !important
}

.font-xl {
    font-size: 200% !important
}

@media (max-width:767px) {
    .hidden-xs {
        display: none !important
    }
}

@media (min-width:768px) and (max-width:991px) {
    .hidden-sm {
        display: none !important
    }
}

@media (min-width:992px) and (max-width:1199px) {
    .hidden-md {
        display: none !important
    }
}

@media (min-width:1200px) and (max-width:1399px) {
    .hidden-lg {
        display: none !important
    }
}

@media (min-width:1400px) and (max-width:1599px) {
    .hidden-xl {
        display: none !important
    }
}

@media (min-width:1600px) {
    .hidden-xxl {
        display: none !important
    }
}

.txt-bolder {
    font-weight: bolder !important;
}

.txt-color-red {
    color: #DD2C00 !important
}

.txt-color-green {
    color: #00C853 !important
}

.txt-color-blue {
    color: #0091EA !important
}

.align-center {
    text-align: center !important;
}

.marquee {
    width: 100%;
    overflow: hidden;
    border: 1px solid #888;
    background: #555;
    /* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#000000+0,383d3f+47,000000+100,28343b+102 */
    background: rgb(0,0,0); /* Old browsers */
    background: -moz-linear-gradient(left, rgba(0,0,0,1) 0%, rgba(56,61,63,1) 47%, rgba(0,0,0,1) 100%, rgba(40,52,59,1) 102%); /* FF3.6-15 */
    background: -webkit-linear-gradient(left, rgba(0,0,0,1) 0%,rgba(56,61,63,1) 47%,rgba(0,0,0,1) 100%,rgba(40,52,59,1) 102%); /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(to right, rgba(0,0,0,1) 0%,rgba(56,61,63,1) 47%,rgba(0,0,0,1) 100%,rgba(40,52,59,1) 102%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#28343b',GradientType=1 ); /* IE6-9 */
    position: fixed;
    bottom: 0px;
    left: 0px;
    box-shadow: 0px 0px 9px #BFBFBF;
    color: #fff !important;
    height: 30px;
    padding: 3px;
}

    .marquee a {
        color: #fff;
        font-size: 13px;
    }

.orgchart {
    background: white !important;
}

    .orgchart td.left, .orgchart td.right, .orgchart td.top {
        border-color: #aaa !important;
    }

    .orgchart td > .down {
        background-color: #aaa !important;
    }

    .orgchart .org-blue .title {
        background-color: #006699 !important;
    }

    .orgchart .org-blue .content {
        border-color: #006699 !important;
    }

    .orgchart .org-green .title {
        background-color: #009933 !important;
    }

    .orgchart .org-green .content {
        border-color: #009933 !important;
    }

    .orgchart .org-purple .title {
        background-color: #993366 !important;
    }

    .orgchart .org-purple .content {
        border-color: #993366 !important;
    }

    .orgchart .org-brown .title {
        background-color: #996633 !important;
    }

    .orgchart .org-brown .content {
        border-color: #996633 !important;
    }

    .orgchart .org-pink .title {
        background-color: #cc0066 !important;
    }

    .orgchart .org-pink .content {
        border-color: #cc0066 !important;
    }

    .orgchart .org-grey .title {
        background-color: #aaa !important;
    }

    .orgchart .org-grey .content {
        border-color: #aaa !important;
    }

.chart-container {
    position: relative;
    height: 620px;
    border: 0px solid #aaa;
    margin: 0.5rem;
    overflow: auto;
    text-align: center;
}

.text-error {
    color: crimson !important;
}

tr .disabled {
    color: #888 !important
}

tr .active {
    color: #555 !important;
    font-weight: bolder;
}

span.select2-container {
    z-index: 10050;
}

.logo_dark {
    font-weight: bolder;
    color: #111;
}

.logo_light {
    font-weight: bolder;
    color: #fefefe;
}


.table-freezen {
    overflow: auto;
    width: 100%;
}

    .table-freezen table {
        table-layout: fixed;
    }

    /*.table-freezen th, .table-freezen td {
        white-space: nowrap;
    }*/

    .table-freezen td:first-child, .table-freezen th:first-child {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        width: 180px;
        background-color: #fff;
        z-index: 999;
        white-space: nowrap;
    }

    .table-freezen thead tr th {
        position: -webkit-sticky;
        position: sticky;
        top: 0px;
        z-index: 99;
        text-align: center;
        border: 1px solid #fff !important;
        height: 90px;
    }

    .table-freezen thead tr.first-row th, thead tr.first-row td {
        position: sticky;
        position: -webkit-sticky;
        top: 0px;
        z-index: 99;
    }

    .table-freezen thead tr.second-row th, thead tr.second-row td {
        position: sticky;
        position: -webkit-sticky;
        top: 90px;
    }

    .table-freezen tbody tr td {
        padding: 2px !important;
    }

    .table-freezen th:first-child {
        z-index: 1000;
    }

    .table-freezen .top {
        position: absolute;
        top: 0px;
    }

    .table-freezen .bottom {
        position: absolute;
        bottom: 0px;
    }

.crud-sm {
    font-size: 11px;
}

    .crud-sm .card.card-with-nav .card-body {
        padding: 5px 10px !important;
    }

    .crud-sm .custom-control {
        min-height: 16.5px;
    }

        .crud-sm .custom-control.custom-checkbox, .crud-sm .custom-control.custom-radio {
            margin-bottom: 0;
            padding-left: 2em;
            cursor: pointer;
            line-height: 16.5px;
            margin-right: 25px
        }

    .crud-sm table button {
        font-size: 11px;
        padding: 0px 5px;
    }

    .crud-sm [class^="col-"]:not(.select2-results__option [class^="col-"]) {
        position: relative;
        width: 100%;
        min-height: 1px;
        padding-right: 5px;
        padding-left: 5px;
    }

    .crud-sm .select2-results__option .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -15px;
        margin-left: -15px;
    }

    .crud-sm .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -5px;
        margin-left: -5px;
    }

    .crud-sm .form-group-default {
        background-color: #fff;
        border: 1px solid rgba(0,0,0,.07);
        border-radius: 4px;
        padding-top: 3px;
        padding-left: 3px;
        padding-right: 0px;
        padding-bottom: 1px;
        overflow: hidden;
        width: 100%;
        -webkit-transition: background-color .2s ease;
        transition: background-color .2s ease;
        margin-bottom: 5px
    }

        .crud-sm .form-group-default .form-control {
            min-height: 16px;
            margin-top: 0px;
            font-size: 11px;
        }

        .crud-sm .form-group-default label:not(.error) {
            font-size: 8.5px !important;
            letter-spacing: .06em;
            text-transform: uppercase;
            font-weight: 500
        }

    .crud-sm .select2-container .select2-selection--single {
        border: none !important;
        height: 16px !important;
    }

    .crud-sm .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #444;
        line-height: 16px;
    }

    .crud-sm .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 16px;
        position: absolute;
        top: 1px;
        right: 1px;
        width: 20px
    }

    .crud-sm table td .select2-container .select2-selection--single {
        border: none !important;
        height: 22px !important;
    }

    .crud-sm table td .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 20px !important
    }

    .crud-sm table td .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 20px !important
    }

    .crud-sm table th, table td {
        font-size: 11px !important;
        border-color: #ebedf2 !important;
        padding: 0.1rem !important
    }

    .crud-sm table td .form-control {
        font-size: 11px !important;
        padding: 0.1rem !important;
    }

    .crud-sm table td select.form-control {
        height: 22px !important;
    }

    .crud-sm input[type="checkbox"] {
        width: 15px !important;
        height: 15px !important;
    }

    .crud-sm .input-group-text {
        font-size: 11px !important;
        height: 16.5px !important;
    }

    .crud-sm table tr td {
        padding: 5px !important;
    }

    .crud-sm *:disabled {
        color: #000000;
        opacity: 1 !important;
    }

.width-100 {
    width: 110px !important;
}

.width-250 {
    width: 250px !important;
}

.width-300 {
    width: 300px !important;
}

.optionGroup {
    font-weight: bold !important;
    font-style: italic !important;
    background-color: #ddd !important;
}

.hr-wavy {
    border-top: 1px solid rgb(0,0,0);
    border-bottom: 1px solid rgba(56,61,63,1);
}

.bg-purple {
    background-color: #f65be3 !important
}

.bg-lightPurple {
    background-color: #ffcfff !important
}

.bg-brown {
    background-color: #594e36 !important
}

.bg-yellow {
    background-color: #ffee63 !important
}

.bg-gray {
    background-color: #333 !important
}

.bg-lightGray {
    background-color: #f5f5f5 !important
}

.bg-lightRed {
    background-color: #ffadad !important
}

.bg-bluegray {
    background-color: #687b8f !important
}

.bg-skyblue {
    background-color: #87ceeb !important
}

.bg-lightPrimary {
    background-color: #def4ff
}

.bg-lightSecondary {
    background-color: #e9daff
}

.bg-lightWarning {
    background-color: #ffe3c5
}

.bg-lightSuccess {
    background-color: #eeffe1;
    color: #000;
    border: 1px solid #1dd72c
}

.quo-focus {
    background-color: #ffe8e8 !important;
    color: #fff;
}

.quo-selected {
    border: 5px outset #fff316;
    -webkit-box-shadow: 0 0 5px #fff316, inset 0 1px 0 #ffc53d;
    -moz-box-shadow: 0 0 5px #fff316, inset 0 1px 0 #ffc53d;
    box-shadow: 0 0 5px #fff316, inset 0 1px 0 #ffc53d;
    background-color: #fdffde !important;
    font-size: 14px;
    font-weight: bolder;
}

.quo-inactive {
    background-color: #aaa !important;
    opacity: 0.5 !important;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.decimal {
    text-align: right;
    color: blue;
}

.flag {
    width: 16px;
    height: 11px;
    background: url(/assets/img/flags.png) no-repeat;
    margin-top: -.18em;
    display: inline-block
}

    .flag.flag-tw {
        background-position: -64px -154px
    }

    .flag.flag-us {
        background-position: -144px -154px
    }

input[type='radio'] {
    accent-color: rgba(40,52,59,1);
}

input,
input::-webkit-input-placeholder {
    font-size: 12px;
}


.wp-95 {
    width: 95% !important;
}


@media (max-width: 575.98px) {
    .text-responsive {
        font-size: 8px;
    }
}


.upload-success {
    color: rgba(0,0,0,.3) !important;
    text-decoration: line-through !important;
}

.required {
    color: red
}

div.divunfinish {
    overflow: auto;
    height: 300px; /* 非必要 */
}

    div.divunfinish thead td {
        position: -webkit-sticky; /* for Safari */
        position: sticky;
        top: 0;
        background-color: Brown;
    }

        div.divunfinish thead td:nth-child(1) {
            left: 0;
            z-index: 1;
        }

        div.divunfinish thead td:nth-child(2) {
            left: 40px;
            z-index: 1;
        }

        div.divunfinish thead td:nth-child(3) {
            left: 100px;
            z-index: 1;
        }

    div.divunfinish tbody td:nth-child(1) {
        position: -webkit-sticky; /* for Safari */
        position: sticky;
        left: 0;
        background-color: white;
    }

    div.divunfinish tbody td:nth-child(2) {
        position: -webkit-sticky; /* for Safari */
        position: sticky;
        left: 40px;
        background-color: white;
    }

    div.divunfinish tbody td:nth-child(3) {
        position: -webkit-sticky; /* for Safari */
        position: sticky;
        left: 100px;
        background-color: white;
    }

.selected {
    border: 2px solid #cc0066;
    background-color: lightpink !important;
}

.dot {
    color: #fff !important;
    -webkit-text-stroke: 1px #333;
    font-weight: bolder;
    border-radius: 15% !important;
    -moz-border-radius: 15% !important;
    -webkit-border-radius: 15% !important;
}



.hoc-sm {
    font-size: 11px;
}

    .hoc-sm .card.card-with-nav .card-body {
        padding: 5px 10px !important;
    }

    .hoc-sm .custom-control {
        min-height: 16.5px;
    }

        .hoc-sm .custom-control.custom-checkbox, .custom-control.custom-radio {
            margin-bottom: 0;
            padding-left: 2em;
            cursor: pointer;
            line-height: 16.5px;
            margin-right: 25px
        }

    .hoc-sm table button {
        font-size: 12px;
        padding: 0px 5px;
    }

    .hoc-sm .form-group-default .form-control {
        min-height: 16px;
        margin-top: 0px;
        font-size: 11px;
    }

    .hoc-sm .form-group-default label:not(.error) {
        font-size: 8.5px !important;
        letter-spacing: .06em;
        text-transform: uppercase;
        font-weight: 500
    }

    .hoc-sm .select2-container .select2-selection--single {
        border: none !important;
        height: 38px !important;
    }

    .hoc-sm .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #444;
        line-height: 16px;
    }

    .hoc-sm .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 16px;
        position: absolute;
        top: 1px;
        right: 1px;
        width: 20px
    }

    .hoc-sm table td .select2-container .select2-selection--single {
        border: none !important;
        height: 22px !important;
    }

    .hoc-sm table td .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 20px !important
    }

    .hoc-sm table td .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 20px !important
    }

    .hoc-sm table td .select2-container--bootstrap .select2-selection--single {
        padding: 0.15rem !important;
    }

    .hoc-sm table th, table td {
        font-size: 11px !important;
        border-color: #ebedf2 !important;
        padding: 0.1rem !important
    }

    .hoc-sm table td select.form-control {
        height: 22px !important;
        padding: 0px !important;
    }

    .hoc-sm input[type="checkbox"] {
        width: 15px !important;
        height: 15px !important;
    }

    /*    .hoc-sm input[type="number"] {
        height: 21.5px !important;
    }*/

    .hoc-sm .input-group-text {
        font-size: 11px !important;
        height: 16.5px !important;
    }

    .hoc-sm *:disabled {
        color: #000000;
        opacity: 1 !important;
    }

.pipeline-pink {
    background: rgba(255, 99, 132, 0.2);
    text-align: center;
    vertical-align: top !important;
}

.pipeline-yellow {
    background: rgba(251, 255, 0, 0.2);
    text-align: center;
    vertical-align: top !important;
}

.pipeline-green {
    background: rgba(132, 255, 0, 0.2);
    text-align: center;
    vertical-align: top !important;
}

.pipeline-blue {
    background: rgba(54, 162, 235, 0.2);
    text-align: center;
    vertical-align: top !important;
}

.pipeline-orange {
    background: rgba(255, 170, 0, 0.2);
    text-align: center;
    vertical-align: top !important;
}

.pipeline-purple {
    background: rgba(153, 102, 255, 0.2);
    text-align: center;
    vertical-align: top !important;
}


.pipeline-lightRed {
    background: #fb6e6e;
    text-align: center;
    vertical-align: top !important;
}

.pipeline-lightYellow {
    background: #edf352;
    text-align: center;
    vertical-align: top !important;
}

.pipeline-thistle {
    background: #edf352;
    text-align: center;
    vertical-align: top !important;
}

.pipeline-tan {
    background: #D2B48C;
    text-align: center;
    vertical-align: top !important;
}

.pipeline-aquamarine {
    background: #7FFFD4;
    text-align: center;
    vertical-align: top !important;
}


.table-responsive {
    min-height: 400px;
}

.break-line {
    width: 250px !important;
    max-width: 250px !important;
    word-wrap: break-word !important;
    font-size: 12px;
}


.font-11 {
    font-size: 11px !important;
}

/* 表格不超出畫面 */
#crud_table_wrapper:has(.crud_table_no_overflow) {
    height: calc(100vh - 330px);
}

/* 壓縮 padding 與字體 */
#crud_table th,
#crud_table td {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    line-height: 1.2; /* 讓行距更緊湊 */
}

/* 可選：限制行高，避免欄位撐太高 */
.compact-table td {
    max-height: 28px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 固定圖表容器高度，避免 reflow 造成抖動 */
#home_year_sales_amount_wrapper {
    position: relative;
    height: 280px; /* 需多高自己改 */
    overflow: hidden; /* 避免出現/消失捲軸引發重排 */
}

/* canvas 填滿容器（絕對定位更穩） */
#home_year_sales_amount {
    position: absolute;
    inset: 0;
    display: block;
}

.badge-inline {
    font-size: 10px;
    padding: 1px 4px;
    line-height: 1;
}

.pipeline-table thead tr {
    position: sticky;
    top: 0;
    z-index: 9;
    background: white;
}

/* 凍結 thead */
.pipeline-table thead th {
    position: relative;
    z-index: 10;
}

.fill-col {
    width: 100%;
    height: 100%;
}


.packiq-analysis-panel table {
    background-color: #fff;
}

.packiq-analysis-panel thead {
    background-color: #282a3c;
}

    .packiq-analysis-panel thead th {
        background-color: #282a3c !important;
        color: #343a40;
        font-weight: 600;
        border-bottom: 1px solid #dee2e6;
    }

/* 避免吃到 form table 的 hover / stripe */
.packiq-analysis-panel tbody tr:hover {
    background-color: #f8f9fa;
}

.width-50p {
    width: 49% !important;
}

.width-33p {
    width: 33% !important;
}


/* 1. 當 Dropdown 開啟時，強烈提升該列的層級與溢出權限 */
.btn-group.show {
    z-index: 10001 !important;
}

/* 2. 核心修正：強制讓包含開啟中選單的 td 能夠溢出並置頂 */
td:has(.btn-group.show) {
    z-index: 10002 !important; /* 高於所有 sticky 欄位 */
    overflow: visible !important;
    position: sticky !important; /* 確保它維持在 sticky 狀態 */
}

/* 3. 解決選單內容過長被表格底部切掉 */
.dropdown-menu.show {
    /* 這裡不用 position: fixed，以免定位跑掉 */
    display: block;
    margin-top: 0;
    /* 確保選單在視覺上最靠前 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
}


/* 編輯中的行效果 */
.row-editing {
    background-color: #fff9db !important; /* 輕微偏黃底色 */
    transition: all 0.2s ease;
}

    .row-editing td {
        border-top: 2px solid #ffc107 !important;
        border-bottom: 2px solid #ffc107 !important;
        position: relative;
        z-index: 8; /* 略高於普通列，確保陰影顯示 */
    }

        /* 加上左右側邊框感 */
        .row-editing td:first-child {
            border-left: 2px solid #ffc107 !important;
        }

        .row-editing td:last-child {
            border-right: 2px solid #ffc107 !important;
        }

/* 增加發光陰影 */
.row-editing {
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.2);
}


.row-has-error td {
    background-color: #fff5f5 !important;
    border-top: 2px solid #dc3545 !important;
    border-bottom: 2px solid #dc3545 !important;
}

    .row-has-error td:first-child {
        border-left: 2px solid #dc3545 !important;
    }

    .row-has-error td:last-child {
        border-right: 2px solid #dc3545 !important;
    }

/* 錯誤時的發光效果 */
.row-has-error {
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.3);
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* Memo 容器樣式 */
.memo-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 滾動區域優化 (高效能精簡滾動條) */
.memo-scroll-area {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

    .memo-scroll-area::-webkit-scrollbar {
        width: 6px;
    }

    .memo-scroll-area::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .memo-scroll-area::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 10px;
    }

.memo-item-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: all 0.2s ease;
}

    .memo-item-card:hover {
        border-color: #007bff;
        background-color: #fcfcfc;
    }

/* 內容內縮 */
.memo-content-text {
    padding-left: 15px;
    white-space: pre-wrap;
    line-height: 1.6;
    color: #333;
    font-size: 13px;
    margin-bottom: 8px;
}

/* 底部資訊列 (人員與時間) */
.memo-footer-info {
    border-top: 1px solid #f8f9fa;
    padding-top: 6px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}
