/* 頂部導航欄樣式 */
.navbar {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-nav .nav-link {
    color: #1e293b !important;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0 0.25rem;
    font-size: 0.9rem;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(6, 182, 212, 0.15);
    color: #06b6d4 !important;
}

.navbar-nav .nav-link.active {
    background-color: #06b6d4;
    color: white !important;
}

.navbar-nav .nav-link.active:hover {
    background-color: #0891b2;
}

/* 下拉選單樣式 */
.dropdown-menu {
    background-color: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(6, 182, 212, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 200px;
}

.dropdown-item {
    color: #1e293b;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.dropdown-item.active {
    background-color: #06b6d4;
    color: white;
}

.dropdown-item.active:hover {
    background-color: #0891b2;
}

/* 主內容區域調整 */
.main-content-wrapper {
    padding-top: 56px;
    min-height: calc(100vh - 56px);
    background: linear-gradient(180deg, #dbe6f7 0%, #aed9ed 50%, #c9e9f9 100%);
    background-attachment: fixed;
    color: #1e293b;
}

/* 響應式設計 */
@media (max-width: 991px) {
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
    }
    
    .dropdown-menu {
        margin-left: 1rem;
        border: none;
        background-color: rgba(255, 255, 255, 0.95);
    }
}

/* 淺色主題卡片樣式 */
.card {
    background: linear-gradient(180deg, rgba(219, 230, 247, 0.95) 0%, rgba(174, 217, 237, 0.95) 50%, rgba(201, 233, 249, 0.95) 100%);
    border-color: rgba(226, 232, 240, 0.8);
    color: #1e293b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.card-header {
    background: linear-gradient(135deg, rgba(219, 230, 247, 0.98) 0%, rgba(174, 217, 237, 0.98) 100%) !important;
    border-bottom-color: rgba(226, 232, 240, 0.8);
    color: #1e293b !important;
}

.card-body {
    background: linear-gradient(180deg, rgba(219, 230, 247, 0.9) 0%, rgba(174, 217, 237, 0.9) 50%, rgba(201, 233, 249, 0.9) 100%);
    color: #1e293b;
}

.card-footer {
    background: linear-gradient(180deg, rgba(219, 230, 247, 0.95) 0%, rgba(174, 217, 237, 0.95) 50%, rgba(201, 233, 249, 0.95) 100%);
    border-top-color: rgba(226, 232, 240, 0.8);
    color: #1e293b;
}

/* 淺色主題表格樣式 */
.table {
    color: #1e293b;
    --bs-table-hover-bg: transparent !important;
    --bs-table-hover-color: #1e293b !important;
    --bs-table-accent-bg: transparent !important;
}

/* 強制移除所有表格 hover 時的 box-shadow - 最高優先級 */
.table tbody tr:hover td,
.table tbody tr:hover th,
.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th,
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th,
.table-dark tbody tr:hover td,
.table-dark tbody tr:hover th,
.table-dark.table-hover tbody tr:hover td,
.table-dark.table-hover tbody tr:hover th,
.table-dark.table-hover > tbody > tr:hover > td,
.table-dark.table-hover > tbody > tr:hover > th,
.table.table-dark.table-hover tbody tr:hover td,
.table.table-dark.table-hover tbody tr:hover th,
.table.table-dark.table-striped.table-hover tbody tr:hover td,
.table.table-dark.table-striped.table-hover tbody tr:hover th {
    box-shadow: none !important;
    --bs-table-accent-bg: transparent !important;
    background-color: inherit !important;
}

.table thead th {
    background: linear-gradient(135deg, rgba(219, 230, 247, 0.98) 0%, rgba(174, 217, 237, 0.98) 100%);
    border-color: rgba(226, 232, 240, 0.8);
    color: #1e293b;
}

.table tbody tr {
    background: linear-gradient(180deg, rgba(219, 230, 247, 0.95) 0%, rgba(174, 217, 237, 0.95) 50%, rgba(201, 233, 249, 0.95) 100%);
}

/* 移除所有表格 hover 效果 - 覆蓋 Bootstrap CSS 變數和 box-shadow */
.table tbody tr:hover {
    --bs-table-hover-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    background: inherit !important;
    box-shadow: none !important;
}

.table tbody tr:hover td,
.table tbody tr:hover th {
    --bs-table-accent-bg: transparent !important;
    background-color: inherit !important;
    box-shadow: none !important;
}

/* 移除所有表格 hover 效果 - 覆蓋 Bootstrap CSS 變數 */
.table-hover > tbody > tr:hover {
    --bs-table-hover-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    background: inherit !important;
    box-shadow: none !important;
    color: inherit !important;
}

.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
    --bs-table-accent-bg: transparent !important;
    background-color: inherit !important;
    box-shadow: none !important;
    color: inherit !important;
}

.table-hover tbody tr:hover {
    --bs-table-hover-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    background: inherit !important;
    box-shadow: none !important;
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    --bs-table-accent-bg: transparent !important;
    background-color: inherit !important;
    box-shadow: none !important;
}

/* 覆蓋 Bootstrap 的 box-shadow inset 效果 - 針對所有表格元素 */
.table > :not(caption) > * > * {
    box-shadow: none !important;
}

.table > tbody > tr:hover > td,
.table > tbody > tr:hover > th {
    --bs-table-accent-bg: transparent !important;
    box-shadow: none !important;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-hover-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    box-shadow: none !important;
}

/* table-dark 相關的 hover 效果 */
.table-dark {
    --bs-table-hover-bg: transparent !important;
    --bs-table-hover-color: #1e293b !important;
    --bs-table-accent-bg: transparent !important;
}

.table-dark.table-hover > tbody > tr:hover {
    --bs-table-hover-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    background: inherit !important;
    box-shadow: none !important;
    color: inherit !important;
}

.table-dark.table-hover > tbody > tr:hover > td,
.table-dark.table-hover > tbody > tr:hover > th {
    --bs-table-accent-bg: transparent !important;
    background-color: inherit !important;
    box-shadow: none !important;
}

.table-dark > :not(caption) > * > * {
    box-shadow: none !important;
}

.table-dark > tbody > tr:hover > td,
.table-dark > tbody > tr:hover > th {
    --bs-table-accent-bg: transparent !important;
    box-shadow: none !important;
}

.table td, .table th {
    border-color: rgba(226, 232, 240, 0.8);
}

/* 淺色主題表單樣式 */
.form-control {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: #06b6d4;
    color: #1e293b;
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}

.form-select {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}

.form-select:focus {
    background-color: #ffffff;
    border-color: #06b6d4;
    color: #1e293b;
    box-shadow: 0 0 0 0.2rem rgba(6, 182, 212, 0.25);
}

/* 深色主題按鈕樣式 */
.btn {
    border-color: #2d3748;
}

.btn-secondary {
    background-color: #94a3b8;
    border-color: #94a3b8;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #0891b2;
    border-color: #0891b2;
    color: #ffffff;
}

/* 淺色主題分頁樣式 */
.pagination .page-link {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}

.pagination .page-link:hover {
    background-color: rgba(6, 182, 212, 0.1);
    border-color: #06b6d4;
    color: #06b6d4;
}

.pagination .page-item.active .page-link {
    background-color: #06b6d4;
    border-color: #06b6d4;
    color: white;
}

.pagination .page-item.disabled .page-link {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
}

/* 淺色主題模態框樣式 */
.modal-content {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

.modal-header {
    background-color: rgba(248, 250, 252, 0.95);
    border-bottom-color: #e2e8f0;
    color: #1e293b;
}

.modal-footer {
    background-color: #ffffff;
    border-top-color: #e2e8f0;
    color: #1e293b;
}

/* 淺色主題文字顏色調整 */
.text-muted {
    color: #64748b !important;
}

.text-info {
    color: #06b6d4 !important;
}

.text-white {
    color: #1e293b !important;
}

/* card-header 中的 text-white 覆蓋 */
.card-header.text-white,
.card-header .text-white,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header p {
    color: #1e293b !important;
}

/* 淺色主題背景色調整 */
.bg-light {
    background-color: rgba(248, 250, 252, 0.95) !important;
}

.bg-primary {
    background-color: #06b6d4 !important;
}

/* 淺色主題邊框調整 */
.border-light {
    border-color: #e2e8f0 !important;
}

/* ============================================
   全局表格 hover 效果移除 - 最高優先級規則
   必須放在文件最後以確保覆蓋所有其他規則
   ============================================ */

/* 首先，禁用所有表格元素的 box-shadow inset 效果 */
table > :not(caption) > * > *,
table.table > :not(caption) > * > *,
table.table-hover > :not(caption) > * > *,
table.table-dark > :not(caption) > * > * {
    box-shadow: none !important;
}

/* 然後，針對 hover 狀態下的所有表格單元格 */
table tbody tr:hover td,
table tbody tr:hover th,
table.table tbody tr:hover td,
table.table tbody tr:hover th,
table.table-hover tbody tr:hover td,
table.table-hover tbody tr:hover th,
table.table-hover > tbody > tr:hover > td,
table.table-hover > tbody > tr:hover > th,
table.table-dark tbody tr:hover td,
table.table-dark tbody tr:hover th,
table.table-dark.table-hover tbody tr:hover td,
table.table-dark.table-hover tbody tr:hover th,
table.table-dark.table-hover > tbody > tr:hover > td,
table.table-dark.table-hover > tbody > tr:hover > th,
table.table.table-dark.table-hover tbody tr:hover td,
table.table.table-dark.table-hover tbody tr:hover th,
table.table.table-dark.table-striped.table-hover tbody tr:hover td,
table.table.table-dark.table-striped.table-hover tbody tr:hover th,
.video-file-table tbody tr:hover td,
.video-file-table tbody tr:hover th,
.video-file-table.table-hover tbody tr:hover td,
.video-file-table.table-hover tbody tr:hover th,
#searchResultsModal table tbody tr:hover td,
#searchResultsModal table tbody tr:hover th {
    box-shadow: none !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-hover-bg: transparent !important;
    background-color: inherit !important;
    background: inherit !important;
}

/* 針對所有可能的表格行 hover 狀態 */
table tbody tr:hover,
table.table tbody tr:hover,
table.table-hover tbody tr:hover,
table.table-hover > tbody > tr:hover,
table.table-dark tbody tr:hover,
table.table-dark.table-hover tbody tr:hover,
table.table-dark.table-hover > tbody > tr:hover {
    --bs-table-accent-bg: transparent !important;
    --bs-table-hover-bg: transparent !important;
    background: inherit !important;
    box-shadow: none !important;
}
