#watermark {
    background-repeat: repeat;
    background-position: left;
    background-size: auto;
    pointer-events: none;
    width: 100%;
    height: 100%;
    top: 60px;
    left: 0;
    line-height: 2;
    margin: 0;
    position: fixed;
    z-index: 99999;
    -webkit-touch-callout: none;
    /* iOS Safari */
    -webkit-user-select: none;
    /* Safari */
    -khtml-user-select: none;
    /* Konqueror HTML */
    -moz-user-select: none;
    /* Old versions of Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Non-prefixed version, currently
    supported by Chrome, Edge, Opera and Firefox */
}

/* body:before {
    background-image: url("/background-image");
    background-repeat: repeat;
    background-position: left;
    background-size: auto;
} */

.page-pagination nav {
    display: flex !important;
    justify-content: center;
}

.dropdown-item {
    height: 35px;
    line-height: 35px;
    padding-bottom: 2.3rem;
}

.modal.modal-vcenter .modal-dialog {
    -webkit-transform: translate(0, -50%);
    -o-transform: translate(0, -50%);
    transform: translate(0, -50%);
    top: 50%;
    margin: 0 auto;
}

.member-detail label.label {
    font-size: 14px;
    color: #666666;
}

.member-detail p {
    font-size: 16px;
    color: #000;
}

.member-detail .dropzone {
    min-height: auto;
    padding: 0;
}

.member-detail .member-photo-left {
    padding-right: 0;
}

.member-detail .member-photo-right {
    padding-left: 5px;
}

@media (max-width: 767px) {
    .member-detail .member-photo-left {
        padding-right: 15;
    }

    .member-detail .member-photo-right {
        padding-left: 15px;
        margin-top: 5px;
    }
}

.select2-selection__rendered {}

.select2-container .select2-selection {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.modal-loader .spinner-grow:nth-child(1) {
    -webkit-animation: spinner-grow 1s linear infinite;
    animation: spinner-grow 1s linear infinite;
}

.modal-loader .spinner-grow:nth-child(2) {
    -webkit-animation: spinner-grow 1s linear infinite;
    animation: spinner-grow 1s linear infinite;
    animation-delay: 0.5s;
}

.switcher-success.switcher-input:checked~.switcher-indicator {
    background: #28a745;
    color: #fff;
}

.detail-table label.label {
    padding: 7px 40px;
    background: #f2f4f8;
}

.rwd-table td:before {
    display: none;
}

@media (max-width: 767px) {
    .rwd-table th {
        display: none;
    }

    .rwd-table td {
        display: block;
    }

    .rwd-table td:before {
        content: attr(data-th);
        width: 6.5em;
        display: inline-block;
        font-weight: bold;
        color: #053aac;
    }

    .rwd-table tr:nth-of-type(2n) {
        background: #eee;
        border-bottom: 1px solid #ffffff;
    }

    .rwd-table tr:nth-of-type(2n) td {
        border-top: 1px solid #ffffff;
    }
}

.navbar .navbar-brand-wrapper .navbar-brand {
    font-size: 1rem;
}

.sidebar-icon-only .navbar .navbar-brand-wrapper {
    justify-content: center !important;
}

@media (max-width: 767px) {
    .navbar .navbar-brand-wrapper {
        justify-content: center !important;
    }
}

.top-navbar-area .fa-language {
    font-size: 24px !important;
}

.alert.alert-md {
    margin-bottom: 0;
    height: 1.5;
    line-height: 1.5;
    padding: .3rem .75rem;
}

.salary-title {
    color: #053aac;
}

.salary-hr {
    border-top: 2px dashed #999999;
}

/* Chat Box 主體樣式 */
#chat-box {
    bottom: 3vh;
    right: calc(1vw + 20px);
    width: 400px;
    display: none;
    z-index: 9999;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(14, 92, 147, 0.3);
    border: none;
    overflow: hidden;
}

/* Chat Box Header */
#chat-box .card-header {
    background: linear-gradient(135deg, #0E5C93 0%, #1a6ba8 100%);
    color: white;
    font-weight: 600;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Header 右側按鈕群組 */
#chat-box .card-header .header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

#chat-box .card-header .btn {
    color: white;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#chat-box .card-header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

#chat-box .card-header select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    height: 30px;
    display: flex;
    align-items: center;
}

#chat-box .card-header select option {
    background: #ffffff;
    color: #000000;
}

/* Chat Body */
#chat-box .card-body {
    background: rgba(255, 255, 255, 0.98);
    padding: 0;
}

/* Chat History */
.chat-history {
    height: calc(80vh - 260px);
    overflow-y: auto;
    padding: 20px 15px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

/* AI 訊息樣式 */
.answer {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%;
    animation: slideInLeft 0.4s ease-out;
}

.answer .answer-icon {
    margin-right: 3px;
    margin-top: 3px;
    flex-shrink: 0;
    min-width: 40px;
}

.answer .answer-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(14, 92, 147, 0.2);
    border: 2px solid #f8fafc;
}

.answer-content {
    max-width: calc(100% - 60px);
    min-width: 0;
}

.answer .answer-gray {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fd 100%);
    margin: 0;
    padding: 10px;
    border-radius: 20px 20px 20px 6px;
    box-shadow: 0 3px 15px rgba(14, 92, 147, 0.1);
    border: 1px solid rgba(14, 92, 147, 0.1);
    color: #2d3748;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

/* 使用者訊息樣式 */
.question {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    width: 100%;
    animation: slideInRight 0.4s ease-out;
}

.question-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 70%;
}

.question .my-message {
    background: linear-gradient(135deg, #0E5C93 0%, #1a6ba8 100%);
    color: white;
    margin: 0;
    padding: 10px;
    border-radius: 20px 20px 6px 20px;
    box-shadow: 0 3px 15px rgba(14, 92, 147, 0.3);
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

/* 時間戳記樣式 */
.message-data-time {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 10px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    margin-top: 6px;
}

.answer-content .message-data-time {
    align-self: flex-end;
    background: rgba(14, 92, 147, 0.1);
    color: #0E5C93;
    border: 1px solid rgba(14, 92, 147, 0.15);
}

.question-content .message-data-time {
    background: rgba(14, 92, 147, 0.15);
    color: #0E5C93;
    border: 1px solid rgba(14, 92, 147, 0.2);
}

/* Chat Footer */
#chat-box .card-footer {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-top: 1px solid rgba(14, 92, 147, 0.1);
    padding-bottom: 0;
}

#chat-box .card-footer .form-control {
    border: 2px solid rgba(14, 92, 147, 0.2);
    font-size: 14px;
}

#chat-box .card-footer .form-control:focus {
    border-color: #0E5C93;
    box-shadow: 0 0 0 3px rgba(14, 92, 147, 0.1);
}

#chat-box .card-footer .btn {
    background: linear-gradient(135deg, #0E5C93 0%, #1a6ba8 100%);
    border: none;
    border-radius: 0 8px 8px 0;
}

#chat-box .card-footer .btn:hover {
    background: linear-gradient(135deg, #0c4a7a 0%, #155a96 100%);
}

/* Chat Toggle Button */
.chat-icon {
    position: fixed;
    bottom: 3vh;
    right: 1vw;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0E5C93 0%, #1a6ba8 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(14, 92, 147, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-icon:hover {
    background: linear-gradient(135deg, #0c4a7a 0%, #155a96 100%);
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(14, 92, 147, 0.6);
}

/* 滾動條美化 */
.chat-history::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-track {
    background: rgba(14, 92, 147, 0.1);
    border-radius: 3px;
}

.chat-history::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0E5C93 0%, #1a6ba8 100%);
    border-radius: 3px;
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0c4a7a 0%, #155a96 100%);
}

/* 動畫效果 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 響應式設計 */
@media (max-width: 767px) {
    #chat-box {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        border-radius: 15px;
        bottom: 10px;
    }

    .chat-history {
        height: calc(70vh - 200px);
        padding: 15px 10px;
    }

    .chat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        right: 15px;
        bottom: 15px;
    }
}

/* Loading 動畫 */
.ai-message .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.1em;
    color: #0E5C93;
}

/* 歡迎訊息樣式 */
#ai-welcome-msg .answer-gray {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4edda 100%);
    border: 1px solid rgba(14, 92, 147, 0.2);
}

.suggested-questions {
    margin-top: 10px;
    padding: 5px;
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fd 100%);
    border-radius: 10px;
    border: 1px solid rgba(14, 92, 147, 0.15);
}

.suggested-questions .row {
    margin: 0;
}

.suggested-questions .col-12 {
    padding: 0 3px;
}

/* 建議問題按鈕樣式 */
.suggested-question-btn {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(14, 92, 147, 0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #0E5C93;
    font-size: 13px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 6px;
    box-shadow: 0 2px 4px rgba(14, 92, 147, 0.08);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.suggested-question-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(14, 92, 147, 0.1), transparent);
    transition: left 0.5s;
}

.suggested-question-btn:hover {
    background: linear-gradient(135deg, #0E5C93 0%, #1a6ba8 100%);
    border-color: #0E5C93;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 92, 147, 0.25);
}

.suggested-question-btn:hover::before {
    left: 100%;
}

.suggested-question-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(14, 92, 147, 0.15);
}

.suggested-question-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 92, 147, 0.2);
}

/* 問題圖示樣式 */
.suggested-question-btn::after {
    content: '→';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: bold;
}

.suggested-question-btn:hover::after {
    opacity: 1;
    right: 12px;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .suggested-questions {
        padding: 12px;
        margin-top: 10px;
    }
    
    .suggested-question-btn {
        font-size: 12px;
        padding: 8px 12px;
        margin-bottom: 4px;
    }
    
    .suggested-question-btn::after {
        right: 12px;
    }
    
    .suggested-question-btn:hover::after {
        right: 10px;
    }
}

.cursor-pointer {
    cursor: pointer;
}

#announceAccordion .announce-content img {
    width: 100%;
    height: auto;
}