/* 地球主題 CSS - 紅底黃字 */
/* Earth Theme CSS - Red Background with Yellow Text */

/* 地球主題變量 */
:root {
    --earth-bg-primary: #8B0000;        /* 深紅色主背景 */
    --earth-bg-secondary: #A52A2A;      /* 棕紅色次背景 */
    --earth-bg-tertiary: #B22222;       /* 火磚色第三背景 */
    --earth-text-primary: #FFD700;      /* 金黃色主文字 */
    --earth-text-secondary: #FFA500;    /* 橙色次文字 */
    --earth-text-muted: #DAA520;        /* 金色靜音文字 */
    --earth-border: #DC143C;            /* 深紅色邊框 */
    --earth-border-light: #CD5C5C;      /* 印度紅淺邊框 */
    --earth-accent: #FF6347;            /* 番茄色強調 */
    --earth-accent-hover: #FF4500;      /* 橙紅色懸停 */
    --earth-success: #32CD32;           /* 酸橙綠成功色 */
    --earth-warning: #FFD700;           /* 金黃色警告 */
    --earth-danger: #FF1493;            /* 深粉紅危險色 */
    --earth-shadow: rgba(139, 0, 0, 0.4); /* 深紅色陰影 */
}

/* 地球主題應用 */
.earth-theme {
    /* 全局背景和文字 */
}

/* body 本身就有 earth-theme class */
body.earth-theme {
    background-color: var(--earth-bg-primary) !important;
    color: var(--earth-text-primary) !important;
}

/* html 背景色（當 body 有主題class時） */
body.earth-theme ~ html,
html:has(body.earth-theme) {
    background-color: var(--earth-bg-primary) !important;
}

/* 覆蓋 Bootstrap 的 bg-light 類（最高優先級） */
body.earth-theme .bg-light,
.earth-theme .bg-light {
    background-color: var(--earth-bg-secondary) !important;
}

/* 導航欄外層容器背景 */
body.earth-theme .navbar-wrapper,
.earth-theme .navbar-wrapper {
    background-color: var(--earth-bg-secondary) !important;
}

/* 導航欄用戶登入文字顏色 */
body.earth-theme .home_user_login,
body.earth-theme .home_user_login a,
.earth-theme .home_user_login,
.earth-theme .home_user_login a {
    color: var(--earth-text-primary) !important;
}

/* 導航欄背景（多重選擇器確保覆蓋） */
body.earth-theme .navbar.navbar-light.bg-light,
body.earth-theme .navbar.bg-light,
body.earth-theme .nav_body,
.earth-theme .navbar.navbar-light.bg-light,
.earth-theme .navbar.bg-light,
.earth-theme .nav_body {
    background-color: var(--earth-bg-secondary) !important;
    background-image: none !important;
    border-bottom: 2px solid var(--earth-border) !important;
}

body.earth-theme .navbar,
.earth-theme .navbar {
    background-color: var(--earth-bg-secondary) !important;
    background-image: none !important;
}

.earth-theme .navbar-light .navbar-nav .nav-link {
    color: var(--earth-text-primary) !important;
}

/* LCA 子導航欄背景 */
body.earth-theme .subnav_bg,
.earth-theme .subnav_bg {
    background-color: var(--earth-bg-tertiary) !important;
    background-image: none !important;
}

/* LCA 子導航欄連結 */
body.earth-theme .survey_form_order_wrap a,
.earth-theme .survey_form_order_wrap a {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .survey_form_order_wrap a:hover,
.earth-theme .survey_form_order_wrap a:hover {
    color: var(--earth-accent) !important;
}

/* LCA 頁面主體容器 */
body.earth-theme .survey_form_body_wrap,
.earth-theme .survey_form_body_wrap {
    background-color: var(--earth-bg-primary) !important;
}

/* LCA Sidebar 側邊欄 */
body.earth-theme .side_bar,
.earth-theme .side_bar {
    background-color: var(--earth-bg-secondary) !important;
}

/* Sidebar Accordion */
body.earth-theme .accordion,
.earth-theme .accordion {
    background-color: var(--earth-bg-tertiary) !important;
    color: var(--earth-text-primary) !important;
}

body.earth-theme .accordion:hover,
body.earth-theme .accordion.active,
.earth-theme .accordion:hover,
.earth-theme .accordion.active {
    background-color: var(--earth-accent) !important;
}

/* Sidebar Panel */
body.earth-theme .panel,
.earth-theme .panel {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
}

/* Sidebar 連結顏色 */
body.earth-theme .side_bar a,
.earth-theme .side_bar a {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .side_bar .group_title div,
.earth-theme .side_bar .group_title div {
    color: var(--earth-text-muted) !important;
}

/* Footer 背景 */
body.earth-theme .copyright_wrap,
.earth-theme .copyright_wrap {
    background-color: var(--earth-bg-tertiary) !important;
    color: var(--earth-text-primary) !important;
    border-top: 2px solid var(--earth-border) !important;
}

body.earth-theme .copyright,
.earth-theme .copyright {
    color: var(--earth-text-primary) !important;
}

/* Admin 頁面樣式 */
/* Admin 導航欄 */
body.earth-theme .navbar-fixed-top,
.earth-theme .navbar-fixed-top {
    background-color: var(--earth-bg-secondary) !important;
    background-image: none !important;
    border-color: var(--earth-border) !important;
}

/* Admin 容器 */
body.earth-theme .container,
.earth-theme .container {
    color: var(--earth-text-primary) !important;
}

/* Admin Panel */
body.earth-theme .panel,
body.earth-theme .panel-default,
.earth-theme .panel,
.earth-theme .panel-default {
    background-color: var(--earth-bg-secondary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .panel-heading,
body.earth-theme .panel-default > .panel-heading,
.earth-theme .panel-heading,
.earth-theme .panel-default > .panel-heading {
    background-color: var(--earth-bg-tertiary) !important;
    background-image: none !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .panel-body,
.earth-theme .panel-body {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
}

/* Admin 下拉選單 */
body.earth-theme .dropdown-menu,
.earth-theme .dropdown-menu {
    background-color: var(--earth-bg-secondary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .dropdown-menu > li > a,
.earth-theme .dropdown-menu > li > a {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .dropdown-menu > li > a:hover,
.earth-theme .dropdown-menu > li > a:hover {
    background-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

/* Admin Nav 連結 */
body.earth-theme .navbar-nav > li > a,
.earth-theme .navbar-nav > li > a {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .navbar-nav > li > a:hover,
body.earth-theme .navbar-nav > .active > a,
.earth-theme .navbar-nav > li > a:hover,
.earth-theme .navbar-nav > .active > a {
    background-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

/* Certification 頁面樣式 */
/* Certification Header */
body.earth-theme .docs-header,
.earth-theme .docs-header {
    background-color: var(--earth-bg-secondary) !important;
    background-image: none !important;
    border-bottom: 2px solid var(--earth-border) !important;
}

body.earth-theme .docs-body,
.earth-theme .docs-body {
    background-color: var(--earth-bg-primary) !important;
    color: var(--earth-text-primary) !important;
}

/* Certification 上方文字 */
body.earth-theme .home_culture_select,
.earth-theme .home_culture_select {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .home_user_login,
.earth-theme .home_user_login {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .home_user_login a,
.earth-theme .home_user_login a {
    color: var(--earth-text-primary) !important;
}

/* Certification Dropdown */
body.earth-theme .dropdown a,
.earth-theme .dropdown a {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .dropdown-content,
.earth-theme .dropdown-content {
    background-color: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
}

body.earth-theme .dropdown-content a,
.earth-theme .dropdown-content a {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .dropdown-content a:hover,
.earth-theme .dropdown-content a:hover {
    background-color: var(--earth-accent) !important;
}

/* Certification Tab */
body.earth-theme .tab_header,
.earth-theme .tab_header {
    background-color: var(--earth-bg-secondary) !important;
    border-bottom: 1px solid var(--earth-border) !important;
}

body.earth-theme .tab,
.earth-theme .tab {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .tab-toggle.active,
.earth-theme .tab-toggle.active {
    background-color: var(--earth-accent) !important;
}

body.earth-theme .content_bg,
.earth-theme .content_bg {
    background-color: var(--earth-bg-secondary) !important;
}

/* Certification Panel */
body.earth-theme .docs-panel,
.earth-theme .docs-panel {
    background-color: var(--earth-bg-secondary) !important;
    border-color: var(--earth-border) !important;
}

/* Certification 按鈕 */
body.earth-theme .header-button,
.earth-theme .header-button {
    background-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .header-button:hover,
.earth-theme .header-button:hover {
    background-color: var(--earth-accent-hover) !important;
}

/* Certification Detail 頁面樣式 */
/* 左側導航欄 */
body.earth-theme .side-bar,
.earth-theme .side-bar {
    background-color: var(--earth-bg-secondary) !important;
    border-right: 1px solid var(--earth-border) !important;
}

/* 使用 ID 選擇器確保最高優先級 */
body.earth-theme #docs-scroll-hash-nav .nav-link,
.earth-theme #docs-scroll-hash-nav .nav-link,
body.earth-theme #docs-scroll-hash-nav a.nav-link,
.earth-theme #docs-scroll-hash-nav a.nav-link {
    color: var(--earth-text-primary) !important;
    background-color: transparent !important;
}

body.earth-theme #docs-scroll-hash-nav .nav-link.active,
body.earth-theme #docs-scroll-hash-nav .nav-link:hover,
.earth-theme #docs-scroll-hash-nav .nav-link.active,
.earth-theme #docs-scroll-hash-nav .nav-link:hover,
body.earth-theme #docs-scroll-hash-nav a.nav-link.active,
body.earth-theme #docs-scroll-hash-nav a.nav-link:hover,
.earth-theme #docs-scroll-hash-nav a.nav-link.active,
.earth-theme #docs-scroll-hash-nav a.nav-link:hover {
    color: var(--earth-text-primary) !important;
    background-color: var(--earth-accent) !important;
}

body.earth-theme .side-bar .nav-link,
.earth-theme .side-bar .nav-link,
body.earth-theme .side-bar a.nav-link,
.earth-theme .side-bar a.nav-link,
body.earth-theme .navbar-nav .nav-link,
.earth-theme .navbar-nav .nav-link,
body.earth-theme .nav-pills .nav-link,
.earth-theme .nav-pills .nav-link,
body.earth-theme .navbar-nav.nav-pills .nav-link,
.earth-theme .navbar-nav.nav-pills .nav-link,
body.earth-theme .nav-pills > .nav-item > .nav-link,
.earth-theme .nav-pills > .nav-item > .nav-link,
body.earth-theme .navbar-nav.nav-pills > .nav-item > .nav-link,
.earth-theme .navbar-nav.nav-pills > .nav-item > .nav-link,
body.earth-theme li.nav-item > a.nav-link,
.earth-theme li.nav-item > a.nav-link {
    color: var(--earth-text-primary) !important;
    background-color: transparent !important;
    text-decoration: none !important;
}

body.earth-theme .side-bar .nav-link.active,
body.earth-theme .side-bar .nav-link:hover,
.earth-theme .side-bar .nav-link.active,
.earth-theme .side-bar .nav-link:hover,
body.earth-theme .side-bar a.nav-link.active,
body.earth-theme .side-bar a.nav-link:hover,
.earth-theme .side-bar a.nav-link.active,
.earth-theme .side-bar a.nav-link:hover,
body.earth-theme .nav-pills .nav-link.active,
body.earth-theme .nav-pills .nav-link:hover,
.earth-theme .nav-pills .nav-link.active,
.earth-theme .nav-pills .nav-link:hover,
body.earth-theme .nav-pills > .nav-item > .nav-link.active,
body.earth-theme .nav-pills > .nav-item > .nav-link:hover,
.earth-theme .nav-pills > .nav-item > .nav-link.active,
.earth-theme .nav-pills > .nav-item > .nav-link:hover,
body.earth-theme .navbar-nav.nav-pills > .nav-item > .nav-link.active,
body.earth-theme .navbar-nav.nav-pills > .nav-item > .nav-link:hover,
.earth-theme .navbar-nav.nav-pills > .nav-item > .nav-link.active,
.earth-theme .navbar-nav.nav-pills > .nav-item > .nav-link:hover,
body.earth-theme li.nav-item > a.nav-link.active,
body.earth-theme li.nav-item > a.nav-link:hover,
.earth-theme li.nav-item > a.nav-link.active,
.earth-theme li.nav-item > a.nav-link:hover {
    background-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

/* 主要內容區域 */
body.earth-theme .org-split-right,
.earth-theme .org-split-right {
    background-color: var(--earth-bg-primary) !important;
    color: var(--earth-text-primary) !important;
}

body.earth-theme .docs-lca-detail,
.earth-theme .docs-lca-detail {
    color: var(--earth-text-primary) !important;
}

/* 表格樣式 */
body.earth-theme .docs-table,
.earth-theme .docs-table {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .docs-table th,
body.earth-theme .docs-table td,
.earth-theme .docs-table th,
.earth-theme .docs-table td {
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .certification_table_header,
.earth-theme .certification_table_header {
    background-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

/* 標籤和文字 */
body.earth-theme .org-split-right label,
.earth-theme .org-split-right label {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .org-split-right span,
.earth-theme .org-split-right span {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .sheetheader,
.earth-theme .sheetheader {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border: 1px solid var(--earth-border) !important;
}

body.earth-theme .sheetheader-label,
.earth-theme .sheetheader-label {
    color: var(--earth-text-primary) !important;
}

body.earth-theme .sheetheader-text,
.earth-theme .sheetheader-text {
    color: var(--earth-text-primary) !important;
}

/* 超連結 */
body.earth-theme .org-split-right a,
.earth-theme .org-split-right a {
    color: var(--earth-accent) !important;
}

body.earth-theme .org-split-right a:hover,
.earth-theme .org-split-right a:hover {
    color: var(--earth-accent-hover) !important;
}

/* 輸入框 */
body.earth-theme .org-split-right input[type="text"],
body.earth-theme .org-split-right input[type="date"],
.earth-theme .org-split-right input[type="text"],
.earth-theme .org-split-right input[type="date"] {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

/* 按鈕樣式 */
body.earth-theme .docs-btn-blue,
.earth-theme .docs-btn-blue {
    background-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .docs-btn-blue:hover,
.earth-theme .docs-btn-blue:hover {
    background-color: var(--earth-accent-hover) !important;
}

/* H4 標題 */
body.earth-theme .org-split-right h4,
.earth-theme .org-split-right h4 {
    color: var(--earth-text-primary) !important;
}


/* 分頁器 Pagination */
body.earth-theme .pagination > li > a,
body.earth-theme .pagination > li > span,
.earth-theme .pagination > li > a,
.earth-theme .pagination > li > span {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .pagination > li > a:hover,
.earth-theme .pagination > li > a:hover {
    background-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .pagination > .active > a,
body.earth-theme .pagination > .active > span,
.earth-theme .pagination > .active > a,
.earth-theme .pagination > .active > span {
    background-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

body.earth-theme .pagination > .disabled > a,
body.earth-theme .pagination > .disabled > span,
.earth-theme .pagination > .disabled > a,
.earth-theme .pagination > .disabled > span {
    background-color: var(--earth-bg-tertiary) !important;
    color: var(--earth-text-muted) !important;
    border-color: var(--earth-border) !important;
}

.earth-theme .navbar-light .navbar-nav .nav-link:hover {
    color: var(--earth-accent) !important;
}

/* 子導航欄地球主題 */
.earth-theme .subnav_bg {
    background-color: var(--earth-bg-secondary) !important;
    border-bottom: 1px solid var(--earth-border);
}

.earth-theme .survey_form_order_wrap > a > div {
    color: var(--earth-text-secondary) !important;
}

.earth-theme .survey_form_order_wrap > a > div:hover {
    color: var(--earth-accent) !important;
}

.earth-theme .nav-active {
    color: var(--earth-accent) !important;
}

/* 主內容區域地球主題 */
.earth-theme .survey_form_body_wrap {
    background-color: var(--earth-bg-primary) !important;
}

.earth-theme .survey_form_body {
    background-color: var(--earth-bg-primary) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .survey_form_header_wrap {
    background: var(--earth-bg-secondary) !important;
    border-bottom: 1px solid var(--earth-border);
}

.earth-theme .survey_form_menu {
    background-color: var(--earth-bg-secondary) !important;
}

/* 表格地球主題 */
.earth-theme .table {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border: 1px solid var(--earth-border) !important;
}

.earth-theme .table_header {
    background: var(--earth-bg-tertiary) !important;
    color: var(--earth-text-primary) !important;
    border-bottom: 1px solid var(--earth-border);
}

.earth-theme .table_text, 
.earth-theme .table_email, 
.earth-theme .table_download, 
.earth-theme .table_link, 
.earth-theme .table_select, 
.earth-theme .table_reply, 
.earth-theme .table_upload, 
.earth-theme .table_enforce, 
.earth-theme .table_edit, 
.earth-theme .table_formula {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border-bottom: 1px solid var(--earth-border-light);
}

.earth-theme .table_text input, 
.earth-theme .table_email input {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border: 1px solid var(--earth-border) !important;
}

.earth-theme .table_text input:focus, 
.earth-theme .table_email input:focus {
    border-color: var(--earth-accent) !important;
    box-shadow: 0 0 5px var(--earth-accent) !important;
}

/* 表格行懸停效果（排除有內聯樣式的 tr 以及特殊表格） */
.earth-theme tbody > tr:not([style*="background"]):hover {
    background-color: var(--earth-bg-tertiary) !important;
}

.earth-theme tbody > tr:not([style*="background"]):nth-child(even) {
    background-color: var(--earth-bg-secondary) !important;
}

.earth-theme tbody > tr:not([style*="background"]):nth-child(odd) {
    background-color: var(--earth-bg-primary) !important;
}

/* productLCAsummary 表格不套用斑馬條紋，保留原始背景色 */
.earth-theme #productLCAsummary tbody > tr:nth-child(even),
.earth-theme #productLCAsummary tbody > tr:nth-child(odd),
.earth-theme #productLCAsummary tbody > tr:hover {
    background-color: initial !important;
}

/* 表格邊框 */
.earth-theme .table th, 
.earth-theme .table td {
    border-color: var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .table tbody td {
    color: var(--earth-text-primary) !important;
}

/* 不套用主題樣式的通用 class */
.earth-theme .no-theme,
.earth-theme .no-theme *,
.earth-theme .alert,
.earth-theme .alert *,
.earth-theme .alert-success,
.earth-theme .alert-success *,
.earth-theme .alert-info,
.earth-theme .alert-info *,
.earth-theme .alert-warning,
.earth-theme .alert-warning *,
.earth-theme .alert-danger,
.earth-theme .alert-danger * {
    background-color: unset !important;
    background-image: unset !important;
    color: unset !important;
}

/* productLCAsummary 表格規則：若有指定字色底色，就不套用佈景主題 */
/* 只為沒有指定字色和底色的元素套用佈景主題文字顏色 */
.earth-theme #productLCAsummary td:not([style*="color"]):not([style*="background"]):not([style]),
.earth-theme #productLCAsummary th:not([style*="color"]):not([style*="background"]):not([style]) {
    color: var(--earth-text-primary) !important;
}

/* 表格標題行（只匹配沒有內聯樣式的） */
.earth-theme .table thead th:not([style*="background"]):not([style*="color"]) {
    background-color: var(--earth-bg-tertiary) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-border) !important;
}

/* productLCAsummary 的 thead th：只為沒有 style 的元素套用佈景主題文字顏色 */
.earth-theme #productLCAsummary thead th:not([style]) {
    color: var(--earth-text-primary) !important;
}

/* orgLCAsummary 表格規則：若 tr 有指定字色底色，其內的 td 不套用佈景主題 */
/* 斑馬條紋只套用到沒有 style 的 tr */
.earth-theme #orgLCAsummary tbody > tr:not([style]):nth-child(even) {
    background-color: var(--earth-bg-secondary) !important;
}

.earth-theme #orgLCAsummary tbody > tr:not([style]):nth-child(odd) {
    background-color: var(--earth-bg-primary) !important;
}

.earth-theme #orgLCAsummary tbody > tr:not([style]):hover {
    background-color: var(--earth-bg-tertiary) !important;
}

/* 只為沒有 style 的 tr 內的 td 套用佈景主題文字顏色 */
.earth-theme #orgLCAsummary tbody > tr:not([style]) td {
    color: var(--earth-text-primary) !important;
}

/* 表單元素地球主題 */
.earth-theme input, 
.earth-theme textarea, 
.earth-theme select {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border: 1px solid var(--earth-border) !important;
}

.earth-theme input:focus, 
.earth-theme textarea:focus {
    border-color: var(--earth-accent) !important;
    box-shadow: 0 0 5px var(--earth-accent) !important;
}

.earth-theme select {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
}

/* 表單組標籤 */
.earth-theme .form-group label, 
.earth-theme .col-form-label {
    color: var(--earth-text-primary) !important;
}

/* 表單控制項 */
.earth-theme .form-control {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border: 1px solid var(--earth-border) !important;
}

.earth-theme .form-control:focus {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-accent) !important;
    box-shadow: 0 0 5px var(--earth-accent) !important;
}

/* 輸入組 */
.earth-theme .input-group-text {
    background-color: var(--earth-bg-tertiary) !important;
    color: var(--earth-text-primary) !important;
    border: 1px solid var(--earth-border) !important;
}

/* 按鈕地球主題 */
.earth-theme .btn {
    background: linear-gradient(to right, var(--earth-accent) 0%, var(--earth-accent-hover) 100%) !important;
    border: 1px solid var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .btn:hover {
    background: linear-gradient(to right, var(--earth-accent-hover) 0%, var(--earth-accent) 100%) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .survey_order_btn, 
.earth-theme .survey_order_btn_only, 
.earth-theme .header_button, 
.earth-theme .save_LCAInfo_btn {
    background: var(--earth-bg-secondary) !important;
    color: var(--earth-text-secondary) !important;
    border: 1px solid var(--earth-border) !important;
}

.earth-theme .survey_order_btn:hover, 
.earth-theme .survey_order_btn_only:hover, 
.earth-theme .header_button:hover, 
.earth-theme .save_LCAInfo_btn:hover {
    background: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
    border-color: var(--earth-accent) !important;
}

/* 側邊欄地球主題 */
.earth-theme .side_bar {
    background-color: var(--earth-bg-secondary) !important;
    border-right: 1px solid var(--earth-border);
}

.earth-theme .side_bar_right_vertical_line > div {
    background: var(--earth-border) !important;
}

.earth-theme a.Item div {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-secondary) !important;
}

.earth-theme a.Item:hover div {
    background: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme a.Item_Active div {
    background: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

/* 頁腳地球主題 */
.earth-theme .copyright_wrap {
    background: var(--earth-bg-secondary) !important;
    color: var(--earth-text-secondary) !important;
    border-top: 1px solid var(--earth-border);
}

.earth-theme .copyright {
    color: var(--earth-text-secondary) !important;
}

/* 彈出框地球主題 */
.earth-theme .select_simapro_wrap {
    background: var(--earth-bg-secondary) !important;
    border: 2px solid var(--earth-border) !important;
}

.earth-theme .select_simapro_left {
    background: var(--earth-bg-tertiary) !important;
}

.earth-theme .select_simapro_right {
    background: var(--earth-bg-secondary) !important;
}

.earth-theme .simapro_done {
    background: var(--earth-bg-tertiary) !important;
    border: 1px solid var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

/* 工具提示地球主題 */
.earth-theme .tooltip > div:first-child {
    background: var(--earth-bg-tertiary) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .tooltip > div:first-child + div {
    border-top-color: var(--earth-bg-tertiary) !important;
}

/* 評論框地球主題 */
.earth-theme .comment_wrap {
    background: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
}

.earth-theme .comment {
    background: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .comment_hint {
    background: var(--earth-danger) !important;
    color: var(--earth-text-primary) !important;
}

/* 表單標籤地球主題 */
.earth-theme label > p {
    color: var(--earth-text-primary) !important;
}

.earth-theme label > p.active {
    color: var(--earth-accent) !important;
}

/* 分頁地球主題 */
.earth-theme .page_item {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-secondary) !important;
    border: 1px solid var(--earth-border) !important;
}

.earth-theme .page_item.current, 
.earth-theme .page_item:hover {
    background: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

/* 標籤頁地球主題 */
.earth-theme .tab {
    color: var(--earth-text-secondary) !important;
}

.earth-theme .active .tab {
    color: var(--earth-text-primary) !important;
}

.earth-theme .content_bg {
    background-color: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
}

/* 標題地球主題 */
.earth-theme .title, 
.earth-theme .add_survey_header_title {
    color: var(--earth-accent) !important;
}

/* 鏈接地球主題 */
.earth-theme a {
    color: var(--earth-text-primary) !important;
}

.earth-theme a:hover {
    color: var(--earth-accent) !important;
}

.earth-theme .inline_link {
    color: var(--earth-text-secondary) !important;
}

.earth-theme .inline_link:hover {
    color: var(--earth-accent) !important;
}

/* 輸入框佔位符地球主題 */
.earth-theme ::-webkit-input-placeholder {
    color: var(--earth-text-muted) !important;
}

.earth-theme :-moz-placeholder {
    color: var(--earth-text-muted) !important;
    opacity: 1;
}

.earth-theme ::-moz-placeholder {
    color: var(--earth-text-muted) !important;
    opacity: 1;
}

.earth-theme :-ms-input-placeholder {
    color: var(--earth-text-muted) !important;
}

/* 錯誤狀態地球主題 */
.earth-theme .error {
    border-color: var(--earth-danger) !important;
    box-shadow: 0 0 0 1px var(--earth-danger) !important;
}

/* 選中狀態地球主題 */
.earth-theme tbody > .survey_order_table_row:hover {
    background: var(--earth-bg-tertiary) !important;
}

.earth-theme tbody > .survey_order_table_row.selected {
    background: var(--earth-bg-tertiary) !important;
}

/* 狀態標籤地球主題 */
.earth-theme .label-inAnalyze {
    background-color: #9370DB !important; /* 紫色 */
}

.earth-theme .label-inProgress {
    background-color: #4169E1 !important; /* 皇家藍 */
}

.earth-theme .label-unSigned {
    background-color: #FFD700 !important; /* 金黃色 */
}

.earth-theme .label-rejected {
    background-color: #696969 !important; /* 暗灰色 */
}

.earth-theme .label-signed {
    background-color: #00CED1 !important; /* 深綠松石色 */
}

.earth-theme .label-completed {
    background-color: #00FA9A !important; /* 中春綠色 */
}

/* 文化選擇面板地球主題 */
.earth-theme .culture_panel {
    background: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
}

.earth-theme .culture_panel ul li {
    color: var(--earth-text-primary) !important;
}

/* 頁面頂部裝飾線地球主題 */
.earth-theme .page_top_wrap > div:first-child {
    background: var(--earth-border) !important;
}

.earth-theme .page_top_wrap > div:first-child + div {
    background: var(--earth-border-light) !important;
}

.earth-theme .page_top_wrap > div:first-child + div + div {
    background: var(--earth-text-muted) !important;
}

/* 表單分割線地球主題 */
.earth-theme .form_split_line {
    background: var(--earth-border) !important;
}

/* 單位標籤地球主題 */
.earth-theme .unit {
    color: var(--earth-text-secondary) !important;
}

/* 頁面切換按鈕地球主題 */
.earth-theme .page_change > div {
    background-color: var(--earth-bg-secondary) !important;
}

/* 下拉選單地球主題 */
.earth-theme .dropdown-menu {
    background-color: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
    box-shadow: 0 4px 8px var(--earth-shadow) !important;
}

.earth-theme .dropdown-item {
    color: var(--earth-text-primary) !important;
}

.earth-theme .dropdown-item:hover, 
.earth-theme .dropdown-item:focus {
    background-color: var(--earth-bg-tertiary) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .dropdown-divider {
    border-color: var(--earth-border) !important;
}

/* 模態框地球主題 */
.earth-theme .modal-content {
    background-color: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .modal-content label,
.earth-theme .modal-content .col-form-label,
.earth-theme .modal-content .row label {
    color: var(--earth-text-primary) !important;
}

.earth-theme .modal-content div,
.earth-theme .modal-content span {
    color: var(--earth-text-primary) !important;
}

/* 表單區域地球主題 */
.earth-theme form,
.earth-theme table-edit-modal,
.earth-theme .edit_form {
    background-color: var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .edit_form label,
.earth-theme .edit_form .col-form-label {
    color: var(--earth-text-primary) !important;
}

.earth-theme .modal-header {
    border-bottom: 1px solid var(--earth-border) !important;
}

.earth-theme .modal-footer {
    border-top: 1px solid var(--earth-border) !important;
}

.earth-theme .modal-title {
    color: var(--earth-text-primary) !important;
}

/* 警告框地球主題 */
.earth-theme .alert {
    background-color: var(--earth-bg-tertiary) !important;
    border: 1px solid var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .alert-success {
    background-color: rgba(50, 205, 50, 0.2) !important;
    border-color: var(--earth-success) !important;
    color: #90EE90 !important;
}

.earth-theme .alert-warning {
    background-color: rgba(255, 215, 0, 0.2) !important;
    border-color: var(--earth-warning) !important;
    color: #FFD700 !important;
}

.earth-theme .alert-danger {
    background-color: rgba(255, 20, 147, 0.2) !important;
    border-color: var(--earth-danger) !important;
    color: #FF69B4 !important;
}

.earth-theme .alert-info {
    background-color: rgba(255, 99, 71, 0.2) !important;
    border-color: var(--earth-accent) !important;
    color: #FFA07A !important;
}

/* 進度條地球主題 */
.earth-theme .progress {
    background-color: var(--earth-bg-tertiary) !important;
}

.earth-theme .progress-bar {
    background-color: var(--earth-accent) !important;
}

/* 卡片地球主題 */
.earth-theme .card {
    background-color: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .card-header {
    background-color: var(--earth-bg-tertiary) !important;
    border-bottom: 1px solid var(--earth-border) !important;
}

.earth-theme .card-footer {
    background-color: var(--earth-bg-tertiary) !important;
    border-top: 1px solid var(--earth-border) !important;
}

.earth-theme .card-title {
    color: var(--earth-text-primary) !important;
}

/* 列表組地球主題 */
.earth-theme .list-group-item {
    background-color: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .list-group-item:hover {
    background-color: var(--earth-bg-tertiary) !important;
}

.earth-theme .list-group-item.active {
    background-color: var(--earth-accent) !important;
    border-color: var(--earth-accent) !important;
}

/* 分頁地球主題增強 */
.earth-theme .pagination .page-link {
    background-color: var(--earth-bg-secondary) !important;
    border: 1px solid var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .pagination .page-link:hover {
    background-color: var(--earth-bg-tertiary) !important;
    border-color: var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .pagination .page-item.active .page-link {
    background-color: var(--earth-accent) !important;
    border-color: var(--earth-accent) !important;
    color: var(--earth-text-primary) !important;
}

/* 導航標籤地球主題 */
.earth-theme .nav-tabs {
    border-bottom: 1px solid var(--earth-border) !important;
}

.earth-theme .nav-tabs .nav-link {
    color: var(--earth-text-secondary) !important;
    border: 1px solid transparent !important;
}

.earth-theme .nav-tabs .nav-link:hover {
    border-color: var(--earth-border) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .nav-tabs .nav-link.active {
    background-color: var(--earth-bg-secondary) !important;
    border-color: var(--earth-border) var(--earth-border) var(--earth-bg-secondary) !important;
    color: var(--earth-text-primary) !important;
}

.earth-theme .nav-tabs .nav-link.active:hover {
    border-color: var(--earth-border) var(--earth-border) var(--earth-bg-secondary) !important;
}

/* 滾動條地球主題 */
.earth-theme ::-webkit-scrollbar {
    width: 8px;
}

.earth-theme ::-webkit-scrollbar-track {
    background: var(--earth-bg-primary);
}

.earth-theme ::-webkit-scrollbar-thumb {
    background: var(--earth-bg-tertiary);
    border-radius: 4px;
}

.earth-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--earth-border);
}
