@charset "utf-8";

/* 下拉選單樣式 - 限制作用範圍 */
.dropdown-container .custom-dropdown {
	border-top: none; /* 避免與 input 邊框重疊變粗 */
	max-height: 100px; /* 視需要限制高度 */
    overflow-y: auto;  /* 當超出高度時出現垂直 scrollbar */
}

.dropdown-container .custom-dropdown200px {
 	max-height: 200px; /*視需要限制高度 */
    overflow-y: auto; /* 當超出高度時出現垂直 scrollbar */
	max-width: 100%;
  	width: 100%;
  	scrollbar-gutter: stable; /* 關鍵：保留 scrollbar 空間，避免寬度變化 */
}

.dropdown-container .custom-dropdown300px .list-group-item {
	display: flex;
	align-items: center;
	height: 40px; /* 根據需要調整高度 */
	line-height: 40px;
	padding: 0 12px; /* 左右內距 */
	padding-top: 0;
  	padding-bottom: 0;
	cursor: pointer;
}

.dropdown-container .custom-dropdown300px .list-group-item.active {
	background-color: #007bff;
	color: white;
	font-weight: normal; /* 避免 font-weight 增加造成高度變化 */
}

.dropdown-container .custom-dropdown300px mark {
	padding: 0;
	margin: 0;
	background-color: yellow;
	font-style: normal;
	font-weight: normal;
}

.modal-dialog {
  max-width: 700px; /* 或更多 */
}

.custom-modal-width {
    max-width: 90%;
}

.modal-body {
  max-height: 80vh;
  overflow-y: auto;
}

.w-90 {
	width:90%;
}

/* 移除小箭頭 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

/* 移除li中間邊線 - 限制作用範圍 */
.list-container .list-group-item {
    border-top: none !important;
    border-bottom: none !important;
    border-left: 1px solid #dee2e6 !important;  /* Bootstrap 預設邊框色 */
    border-right: 1px solid #dee2e6 !important;
}

/* 第一個 li 保留上邊框 */
.list-container .list-group-item.border-top-visible {
    border-top: 1px solid #dee2e6 !important;
}

/* 最後一個 li 保留下邊框 */
.list-container .list-group-item.border-bottom-visible {
    border-bottom: 1px solid #dee2e6 !important;
}

.label-wide {
  min-width: 6em; /* 根據需要自行調整 */
}

.form-check-input[type="radio"] {
   vertical-align: middle;
   position: relative;
   top: -2px; /* 可微調為 -2px、0px，看實際效果 */
}

.acctColWidth{
	width: 14%; /* 或用 20%, 看情況 */
	min-width: 150px;
}

/* 移除btn hover */
.btn.no-hover:hover {
    background-color: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
    text-decoration: none !important;
    cursor: default !important; /* 取消手指指標 */
}

#news-data-title {
	cursor: pointer;
}

/* 常見問題 Modal 樣式 */
.faq-tabs .nav-link {
    color: #666;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    padding: 10px 20px;
    margin-right: 10px;
    font-size: 14px;
}

.faq-tabs .nav-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: none;
}

.faq-item {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.faq-question {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #333;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #007bff;
}

.faq-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
    min-width: 20px;
    text-align: center;
}

/* 這是關鍵的CSS - 控制答案的顯示/隱藏 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: #666;
    line-height: 1.6;
}

.faq-answer.show {
    max-height: 500px;
    padding: 15px 0;
}

.tab-content {
    padding-top: 20px;
}

/* 服務總覽 Modal 樣式 */
.service-tabs .nav-link {
    color: #666;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    padding: 10px 20px;
    margin-right: 10px;
    font-size: 14px;
}

.service-tabs .nav-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: none;
}

.service-item {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.service-function {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #333;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.service-function:hover {
    color: #007bff;
}

.service-function:not(.expandable) {
    cursor: default;
}

.service-function:not(.expandable):hover {
    color: #333;
}

.service-name {
    flex: 1;
}

.service-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
    min-width: 20px;
    text-align: center;
}

.service-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f8f9fa;
    margin: 0 -10px;
    border-radius: 5px;
}

.service-submenu.show {
    max-height: 300px;
    padding: 15px 20px;
}

.service-subitem {
    padding: 8px 0;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: color 0.3s ease;
}

.service-subitem:last-child {
    border-bottom: none;
}

.service-subitem:hover {
    color: #007bff;
}

/* 水平排列的細項樣式 */
.service-submenu.horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    padding: 15px 0 !important;
    background-color: transparent;
    margin: 0;
}

.service-submenu.horizontal .service-subitem {
    padding: 8px 0;
    color: #666;
    font-size: 14px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.service-submenu.horizontal .service-subitem:hover {
    color: #007bff;
}

/* 企業基本設定樣式 - 限制作用範圍到特定容器 */
.company-settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.company-settings-container .section-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.company-settings-container .settings-form {
    display: grid;
    gap: 1.5rem;
}

.company-settings-container .form-group {
    display: flex;
    flex-direction: column;
}

.company-settings-container .form-label {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.company-settings-container .form-control {
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.company-settings-container .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

.company-settings-container .form-control[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.company-settings-container .form-control.is-invalid {
    border-color: #e74c3c;
}

.company-settings-container .form-control.is-invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25);
}

.company-settings-container .form-select {
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.company-settings-container .form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

.company-settings-container .radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.company-settings-container .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-settings-container .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.company-settings-container .form-check-label {
    font-size: 1rem;
    color: #34495e;
    cursor: pointer;
    margin: 0;
}

.company-settings-container .invalid-feedback {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.company-settings-container .form-control.is-invalid ~ .invalid-feedback,
.company-settings-container .form-select.is-invalid ~ .invalid-feedback {
    display: block;
}

.company-settings-container .button-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e8ed;
}

.company-settings-container .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.company-settings-container .btn-primary {
    background-color: #3498db;
    color: white;
}

.company-settings-container .btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.company-settings-container .btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.company-settings-container .btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.company-settings-container .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 對話框樣式 - 限制作用範圍 */
.company-settings-container .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.company-settings-container .modal-header {
    background-color: #3498db;
    color: white;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.company-settings-container .modal-title {
    font-weight: 600;
}

.company-settings-container .btn-close {
    filter: brightness(0) invert(1);
}

.company-settings-container .settings-preview {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border-left: 4px solid #3498db;
}

.company-settings-container .settings-preview .preview-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.company-settings-container .settings-preview .preview-item:last-child {
    border-bottom: none;
}

.company-settings-container .settings-preview .preview-label {
    font-weight: 600;
    color: #495057;
}

.company-settings-container .settings-preview .preview-value {
    color: #6c757d;
}

/* Toast 樣式 */
.toast-right-show {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1056;
}

.toast-header.bg-success {
    background-color: #27ae60 !important;
}

.toast-header.bg-danger {
    background-color: #e74c3c !important;
}

/* 載入動畫 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 企業基本設定 - 左右對齊布局 */
.company-settings-container .form-row {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.company-settings-container .form-row:last-child {
    border-bottom: none;
}

.company-settings-container .form-label-left {
    width: 200px;
    min-width: 200px;
    font-weight: 600;
    color: #34495e;
    margin: 0;
    padding-right: 2rem;
    text-align: left;
    flex-shrink: 0;
}

.company-settings-container .form-input-right {
    flex: 1;
    max-width: 400px;
}

.company-settings-container .form-input-right .form-control,
.company-settings-container .form-input-right .form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.company-settings-container .form-input-right .form-control:focus,
.company-settings-container .form-input-right .form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

.company-settings-container .form-input-right .form-control[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

.company-settings-container .radio-group-horizontal {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.company-settings-container .radio-group-horizontal .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.company-settings-container .radio-group-horizontal .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    margin: 0;
}

.company-settings-container .radio-group-horizontal .form-check-label {
    font-size: 1rem;
    color: #34495e;
    cursor: pointer;
    margin: 0;
    white-space: nowrap;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .company-settings-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .company-settings-container .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .company-settings-container .button-group {
        flex-direction: column;
    }
    
    .company-settings-container .btn {
        width: 100%;
    }
    
    .company-settings-container .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .company-settings-container .form-label-left {
        width: 100%;
        padding-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .company-settings-container .form-input-right {
        width: 100%;
        max-width: none;
    }
    
    .company-settings-container .radio-group-horizontal {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .company-settings-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .company-settings-container .section-title {
        font-size: 1.25rem;
    }
}

/* 成功提示對話框樣式 */
#successModal .modal-header {
    background-color: #3498db !important;
    color: white !important;
    border-bottom: none;
}

#successModal .modal-title {
    font-weight: 600;
    color: white !important;
}

#successModal .success-icon svg {
    color: #3498db !important;
    fill: #3498db !important;
}

#successModal .btn-primary {
    background-color: #3498db !important;
    border-color: #3498db !important;
}

#successModal .btn-primary:hover {
    background-color: #2980b9 !important;
    border-color: #2980b9 !important;
}

/* 拖曳中切換為「抓手」的游標，並避免不小心選到文字。 */
#tableScrollContainer.dragging {
	cursor: grabbing;
	user-select: none;
}

.z-mask {
	z-index: 1057;
}

.rcode-container {
    position: relative;
    display: inline-block;
    padding-right: 10px; /* 預留空間，避免文字被驚嘆號蓋住 */
}

.rcode-icon {
    position: absolute;
    top: -4px;       /* 貼近上緣 */
    right: 0;        /* 靠右上角 */
    font-size: 10px; /* 小小的 */
    color: #ff3b30;  /* 醒目的紅色 */
    cursor: pointer;
    line-height: 1;
}

.min-height-60vh {
	min-height: 60vh;
}

.hide,.display-none {
	display: none;
}

.w220 {
	width: 220px;
}

.w250 {
	width: 250px;
}

.disable-footer {
	pointer-events: none;
	opacity: 0.6;
}

.enable-footer {
	pointer-events: auto;
	opacity: 1;
}

.display-inline {
	display: inline;
}

.page-link span {
	pointer-events: none;
}