/* 物種主題 CSS - 紫底白字暗色調 */
/* Species Theme CSS - Purple Background with White Text, Dark Tone */

/* 物種主題變量 */
:root {
    --species-bg-primary: #2d1b69;        /* 深紫色主背景 */
    --species-bg-secondary: #4a2c8a;      /* 中紫色次背景 */
    --species-bg-tertiary: #6a4c93;       /* 淺紫色第三背景 */
    --species-text-primary: #ffffff;      /* 白色主文字 */
    --species-text-secondary: #e1bee7;    /* 淺紫色次文字 */
    --species-text-muted: #ce93d8;        /* 淺紫色靜音文字 */
    --species-border: #8e24aa;            /* 紫色邊框 */
    --species-border-light: #ab47bc;      /* 淺紫色邊框 */
    --species-accent: #ffeb3b;            /* 亮黃色強調 */
    --species-accent-hover: #fff176;      /* 淺亮黃色懸停 */
    --species-success: #4caf50;           /* 綠色成功色 */
    --species-warning: #ff9800;           /* 橙色警告 */
    --species-danger: #f44336;            /* 紅色危險色 */
    --species-shadow: rgba(45, 27, 105, 0.5); /* 深紫色陰影 */
}

/* 物種主題應用 */
/* body 本身就有 species-theme class */
body.species-theme {
    background-color: var(--species-bg-primary) !important;
    color: var(--species-text-primary) !important;
}

/* html 背景色（當 body 有主題class時） */
body.species-theme ~ html,
html:has(body.species-theme) {
    background-color: var(--species-bg-primary) !important;
}

/* 覆蓋 Bootstrap 的 bg-light 類（最高優先級） */
body.species-theme .bg-light,
.species-theme .bg-light {
    background-color: var(--species-bg-secondary) !important;
}

/* 導航欄外層容器背景 */
body.species-theme .navbar-wrapper,
.species-theme .navbar-wrapper {
    background-color: var(--species-bg-secondary) !important;
}

/* 導航欄用戶登入文字顏色 */
body.species-theme .home_user_login,
body.species-theme .home_user_login a,
.species-theme .home_user_login,
.species-theme .home_user_login a {
    color: var(--species-text-primary) !important;
}

/* 導航欄背景（多重選擇器確保覆蓋） */
body.species-theme .navbar.navbar-light.bg-light,
body.species-theme .navbar.bg-light,
body.species-theme .nav_body,
.species-theme .navbar.navbar-light.bg-light,
.species-theme .navbar.bg-light,
.species-theme .nav_body {
    background-color: var(--species-bg-secondary) !important;
    background-image: none !important;
    border-bottom: 2px solid var(--species-border) !important;
}

body.species-theme .navbar,
.species-theme .navbar {
    background-color: var(--species-bg-secondary) !important;
    background-image: none !important;
}

.species-theme .navbar-light .navbar-nav .nav-link {
    color: var(--species-text-primary) !important;
}

/* LCA 子導航欄背景 */
body.species-theme .subnav_bg,
.species-theme .subnav_bg {
    background-color: var(--species-bg-tertiary) !important;
    background-image: none !important;
}

/* LCA 子導航欄連結 */
body.species-theme .survey_form_order_wrap a,
.species-theme .survey_form_order_wrap a {
    color: var(--species-text-primary) !important;
}

body.species-theme .survey_form_order_wrap a:hover,
.species-theme .survey_form_order_wrap a:hover {
    color: var(--species-accent) !important;
}

/* LCA 頁面主體容器 */
body.species-theme .survey_form_body_wrap,
.species-theme .survey_form_body_wrap {
    background-color: var(--species-bg-primary) !important;
}

/* LCA Sidebar 側邊欄 */
body.species-theme .side_bar,
.species-theme .side_bar {
    background-color: var(--species-bg-secondary) !important;
}

/* Sidebar Accordion */
body.species-theme .accordion,
.species-theme .accordion {
    background-color: var(--species-bg-tertiary) !important;
    color: var(--species-text-primary) !important;
}

body.species-theme .accordion:hover,
body.species-theme .accordion.active,
.species-theme .accordion:hover,
.species-theme .accordion.active {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

/* Sidebar Panel */
body.species-theme .panel,
.species-theme .panel {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
}

/* Sidebar 連結顏色 */
body.species-theme .side_bar a,
.species-theme .side_bar a {
    color: var(--species-text-primary) !important;
}

body.species-theme .side_bar .group_title div,
.species-theme .side_bar .group_title div {
    color: var(--species-text-muted) !important;
}

/* Footer 背景 */
body.species-theme .copyright_wrap,
.species-theme .copyright_wrap {
    background-color: var(--species-bg-tertiary) !important;
    color: var(--species-text-primary) !important;
    border-top: 2px solid var(--species-border) !important;
}

body.species-theme .copyright,
.species-theme .copyright {
    color: var(--species-text-primary) !important;
}

/* Admin 頁面樣式 */
/* Admin 導航欄 */
body.species-theme .navbar-fixed-top,
.species-theme .navbar-fixed-top {
    background-color: var(--species-bg-secondary) !important;
    background-image: none !important;
    border-color: var(--species-border) !important;
}

/* Admin 容器 */
body.species-theme .container,
.species-theme .container {
    color: var(--species-text-primary) !important;
}

/* Admin Panel */
body.species-theme .panel,
body.species-theme .panel-default,
.species-theme .panel,
.species-theme .panel-default {
    background-color: var(--species-bg-secondary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .panel-heading,
body.species-theme .panel-default > .panel-heading,
.species-theme .panel-heading,
.species-theme .panel-default > .panel-heading {
    background-color: var(--species-bg-tertiary) !important;
    background-image: none !important;
    color: var(--species-text-primary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .panel-body,
.species-theme .panel-body {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
}

/* Admin 下拉選單 */
body.species-theme .dropdown-menu,
.species-theme .dropdown-menu {
    background-color: var(--species-bg-secondary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .dropdown-menu > li > a,
.species-theme .dropdown-menu > li > a {
    color: var(--species-text-primary) !important;
}

body.species-theme .dropdown-menu > li > a:hover,
.species-theme .dropdown-menu > li > a:hover {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

/* Admin Nav 連結 */
body.species-theme .navbar-nav > li > a,
.species-theme .navbar-nav > li > a {
    color: var(--species-text-primary) !important;
}

body.species-theme .navbar-nav > li > a:hover,
body.species-theme .navbar-nav > .active > a,
.species-theme .navbar-nav > li > a:hover,
.species-theme .navbar-nav > .active > a {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

/* Certification 頁面樣式 */
/* Certification Header */
body.species-theme .docs-header,
.species-theme .docs-header {
    background-color: var(--species-bg-secondary) !important;
    background-image: none !important;
    border-bottom: 2px solid var(--species-border) !important;
}

body.species-theme .docs-body,
.species-theme .docs-body {
    background-color: var(--species-bg-primary) !important;
    color: var(--species-text-primary) !important;
}

/* Certification 上方文字 */
body.species-theme .home_culture_select,
.species-theme .home_culture_select {
    color: var(--species-text-primary) !important;
}

body.species-theme .home_user_login,
.species-theme .home_user_login {
    color: var(--species-text-primary) !important;
}

body.species-theme .home_user_login a,
.species-theme .home_user_login a {
    color: var(--species-text-primary) !important;
}

/* Certification Dropdown */
body.species-theme .dropdown a,
.species-theme .dropdown a {
    color: var(--species-text-primary) !important;
}

body.species-theme .dropdown-content,
.species-theme .dropdown-content {
    background-color: var(--species-bg-secondary) !important;
    border: 1px solid var(--species-border) !important;
}

body.species-theme .dropdown-content a,
.species-theme .dropdown-content a {
    color: var(--species-text-primary) !important;
}

body.species-theme .dropdown-content a:hover,
.species-theme .dropdown-content a:hover {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

/* Certification Tab */
body.species-theme .tab_header,
.species-theme .tab_header {
    background-color: var(--species-bg-secondary) !important;
    border-bottom: 1px solid var(--species-border) !important;
}

body.species-theme .tab,
.species-theme .tab {
    color: var(--species-text-primary) !important;
}

body.species-theme .tab-toggle.active,
.species-theme .tab-toggle.active {
    background-color: var(--species-accent) !important;
}

body.species-theme .content_bg,
.species-theme .content_bg {
    background-color: var(--species-bg-secondary) !important;
}

/* Certification Panel */
body.species-theme .docs-panel,
.species-theme .docs-panel {
    background-color: var(--species-bg-secondary) !important;
    border-color: var(--species-border) !important;
}

/* Certification 按鈕 */
body.species-theme .header-button,
.species-theme .header-button {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .header-button:hover,
.species-theme .header-button:hover {
    background-color: var(--species-accent-hover) !important;
}

/* Certification Detail 頁面樣式 */
/* 左側導航欄 */
body.species-theme .side-bar,
.species-theme .side-bar {
    background-color: var(--species-bg-secondary) !important;
    border-right: 1px solid var(--species-border) !important;
}

/* 使用 ID 選擇器確保最高優先級 */
body.species-theme #docs-scroll-hash-nav .nav-link,
.species-theme #docs-scroll-hash-nav .nav-link,
body.species-theme #docs-scroll-hash-nav a.nav-link,
.species-theme #docs-scroll-hash-nav a.nav-link {
    color: var(--species-text-primary) !important;
    background-color: transparent !important;
}

body.species-theme #docs-scroll-hash-nav .nav-link.active,
body.species-theme #docs-scroll-hash-nav .nav-link:hover,
.species-theme #docs-scroll-hash-nav .nav-link.active,
.species-theme #docs-scroll-hash-nav .nav-link:hover,
body.species-theme #docs-scroll-hash-nav a.nav-link.active,
body.species-theme #docs-scroll-hash-nav a.nav-link:hover,
.species-theme #docs-scroll-hash-nav a.nav-link.active,
.species-theme #docs-scroll-hash-nav a.nav-link:hover {
    color: var(--species-bg-primary) !important;
    background-color: var(--species-accent) !important;
}

body.species-theme .side-bar .nav-link,
.species-theme .side-bar .nav-link,
body.species-theme .side-bar a.nav-link,
.species-theme .side-bar a.nav-link,
body.species-theme .navbar-nav .nav-link,
.species-theme .navbar-nav .nav-link,
body.species-theme .nav-pills .nav-link,
.species-theme .nav-pills .nav-link,
body.species-theme .navbar-nav.nav-pills .nav-link,
.species-theme .navbar-nav.nav-pills .nav-link,
body.species-theme .nav-pills > .nav-item > .nav-link,
.species-theme .nav-pills > .nav-item > .nav-link,
body.species-theme .navbar-nav.nav-pills > .nav-item > .nav-link,
.species-theme .navbar-nav.nav-pills > .nav-item > .nav-link,
body.species-theme li.nav-item > a.nav-link,
.species-theme li.nav-item > a.nav-link {
    color: var(--species-text-primary) !important;
    background-color: transparent !important;
    text-decoration: none !important;
}

body.species-theme .side-bar .nav-link.active,
body.species-theme .side-bar .nav-link:hover,
.species-theme .side-bar .nav-link.active,
.species-theme .side-bar .nav-link:hover,
body.species-theme .side-bar a.nav-link.active,
body.species-theme .side-bar a.nav-link:hover,
.species-theme .side-bar a.nav-link.active,
.species-theme .side-bar a.nav-link:hover,
body.species-theme .nav-pills .nav-link.active,
body.species-theme .nav-pills .nav-link:hover,
.species-theme .nav-pills .nav-link.active,
.species-theme .nav-pills .nav-link:hover,
body.species-theme .nav-pills > .nav-item > .nav-link.active,
body.species-theme .nav-pills > .nav-item > .nav-link:hover,
.species-theme .nav-pills > .nav-item > .nav-link.active,
.species-theme .nav-pills > .nav-item > .nav-link:hover,
body.species-theme .navbar-nav.nav-pills > .nav-item > .nav-link.active,
body.species-theme .navbar-nav.nav-pills > .nav-item > .nav-link:hover,
.species-theme .navbar-nav.nav-pills > .nav-item > .nav-link.active,
.species-theme .navbar-nav.nav-pills > .nav-item > .nav-link:hover,
body.species-theme li.nav-item > a.nav-link.active,
body.species-theme li.nav-item > a.nav-link:hover,
.species-theme li.nav-item > a.nav-link.active,
.species-theme li.nav-item > a.nav-link:hover {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

/* 主要內容區域 */
body.species-theme .org-split-right,
.species-theme .org-split-right {
    background-color: var(--species-bg-primary) !important;
    color: var(--species-text-primary) !important;
}

body.species-theme .docs-lca-detail,
.species-theme .docs-lca-detail {
    color: var(--species-text-primary) !important;
}

/* 表格樣式 */
body.species-theme .docs-table,
.species-theme .docs-table {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .docs-table th,
body.species-theme .docs-table td,
.species-theme .docs-table th,
.species-theme .docs-table td {
    color: var(--species-text-primary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .certification_table_header,
.species-theme .certification_table_header {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

/* 標籤和文字 */
body.species-theme .org-split-right label,
.species-theme .org-split-right label {
    color: var(--species-text-primary) !important;
}

body.species-theme .org-split-right span,
.species-theme .org-split-right span {
    color: var(--species-text-primary) !important;
}

body.species-theme .sheetheader,
.species-theme .sheetheader {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border: 1px solid var(--species-border) !important;
}

body.species-theme .sheetheader-label,
.species-theme .sheetheader-label {
    color: var(--species-text-primary) !important;
}

body.species-theme .sheetheader-text,
.species-theme .sheetheader-text {
    color: var(--species-text-primary) !important;
}

/* 超連結 */
body.species-theme .org-split-right a,
.species-theme .org-split-right a {
    color: var(--species-accent) !important;
}

body.species-theme .org-split-right a:hover,
.species-theme .org-split-right a:hover {
    color: var(--species-accent-hover) !important;
}

/* 輸入框 */
body.species-theme .org-split-right input[type="text"],
body.species-theme .org-split-right input[type="date"],
.species-theme .org-split-right input[type="text"],
.species-theme .org-split-right input[type="date"] {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border-color: var(--species-border) !important;
}

/* 按鈕樣式 */
body.species-theme .docs-btn-blue,
.species-theme .docs-btn-blue {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .docs-btn-blue:hover,
.species-theme .docs-btn-blue:hover {
    background-color: var(--species-accent-hover) !important;
}

/* H4 標題 */
body.species-theme .org-split-right h4,
.species-theme .org-split-right h4 {
    color: var(--species-text-primary) !important;
}


/* 分頁器 Pagination */
body.species-theme .pagination > li > a,
body.species-theme .pagination > li > span,
.species-theme .pagination > li > a,
.species-theme .pagination > li > span {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .pagination > li > a:hover,
.species-theme .pagination > li > a:hover {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .pagination > .active > a,
body.species-theme .pagination > .active > span,
.species-theme .pagination > .active > a,
.species-theme .pagination > .active > span {
    background-color: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
    border-color: var(--species-border) !important;
}

body.species-theme .pagination > .disabled > a,
body.species-theme .pagination > .disabled > span,
.species-theme .pagination > .disabled > a,
.species-theme .pagination > .disabled > span {
    background-color: var(--species-bg-tertiary) !important;
    color: var(--species-text-muted) !important;
    border-color: var(--species-border) !important;
}

.species-theme .navbar-light .navbar-nav .nav-link:hover {
    color: var(--species-accent) !important;
}

/* 子導航欄物種主題 */
.species-theme .subnav_bg {
    background-color: var(--species-bg-secondary) !important;
    border-bottom: 1px solid var(--species-border);
}

.species-theme .survey_form_order_wrap > a > div {
    color: var(--species-text-secondary) !important;
}

.species-theme .survey_form_order_wrap > a > div:hover {
    color: var(--species-accent) !important;
}

.species-theme .nav-active {
    color: var(--species-accent) !important;
}

/* 主內容區域物種主題 */
.species-theme .survey_form_body_wrap {
    background-color: var(--species-bg-primary) !important;
}

.species-theme .survey_form_body {
    background-color: var(--species-bg-primary) !important;
    color: var(--species-text-primary) !important;
}

.species-theme .body_content {
    background-color: var(--species-bg-primary) !important;
    color: var(--species-text-primary) !important;
}

.species-theme .survey_form_header_wrap {
    background: var(--species-bg-secondary) !important;
    border-bottom: 1px solid var(--species-border);
}

.species-theme .survey_form_menu {
    background-color: var(--species-bg-secondary) !important;
}

/* 表格物種主題 */
.species-theme .table {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border: 1px solid var(--species-border) !important;
}

.species-theme .table_header {
    background: var(--species-bg-tertiary) !important;
    color: var(--species-text-primary) !important;
    border-bottom: 1px solid var(--species-border);
}

.species-theme .table_text, 
.species-theme .table_email, 
.species-theme .table_download, 
.species-theme .table_link, 
.species-theme .table_select, 
.species-theme .table_reply, 
.species-theme .table_upload, 
.species-theme .table_enforce, 
.species-theme .table_edit, 
.species-theme .table_formula {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border-bottom: 1px solid var(--species-border-light);
}

.species-theme .table_text input, 
.species-theme .table_email input {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border: 1px solid var(--species-border) !important;
}

.species-theme .table_text input:focus, 
.species-theme .table_email input:focus {
    border-color: var(--species-accent) !important;
    box-shadow: 0 0 5px var(--species-accent) !important;
}

/* 表格行懸停效果（排除有內聯樣式的 tr 以及特殊表格） */
.species-theme tbody > tr:not([style*="background"]):hover {
    background-color: var(--species-bg-tertiary) !important;
}

.species-theme tbody > tr:not([style*="background"]):nth-child(even) {
    background-color: var(--species-bg-secondary) !important;
}

.species-theme tbody > tr:not([style*="background"]):nth-child(odd) {
    background-color: var(--species-bg-primary) !important;
}

/* productLCAsummary 表格不套用斑馬條紋，保留原始背景色 */
.species-theme #productLCAsummary tbody > tr:nth-child(even),
.species-theme #productLCAsummary tbody > tr:nth-child(odd),
.species-theme #productLCAsummary tbody > tr:hover {
    background-color: initial !important;
}

/* 表格邊框 */
.species-theme .table th, 
.species-theme .table td {
    border-color: var(--species-border) !important;
    color: var(--species-text-primary) !important;
}

.species-theme .table tbody td {
    color: var(--species-text-primary) !important;
}

/* 不套用主題樣式的通用 class */
.species-theme .no-theme,
.species-theme .no-theme *,
.species-theme .alert,
.species-theme .alert *,
.species-theme .alert-success,
.species-theme .alert-success *,
.species-theme .alert-info,
.species-theme .alert-info *,
.species-theme .alert-warning,
.species-theme .alert-warning *,
.species-theme .alert-danger,
.species-theme .alert-danger * {
    background-color: unset !important;
    background-image: unset !important;
    color: unset !important;
}

/* productLCAsummary 表格規則：若有指定字色底色，就不套用佈景主題 */
/* 只為沒有指定字色和底色的元素套用佈景主題文字顏色 */
.species-theme #productLCAsummary td:not([style*="color"]):not([style*="background"]):not([style]),
.species-theme #productLCAsummary th:not([style*="color"]):not([style*="background"]):not([style]) {
    color: var(--species-text-primary) !important;
}

/* 表格標題行（只匹配沒有內聯樣式的） */
.species-theme .table thead th:not([style*="background"]):not([style*="color"]) {
    background-color: var(--species-bg-tertiary) !important;
    color: var(--species-text-primary) !important;
    border-color: var(--species-border) !important;
}

/* productLCAsummary 的 thead th：只為沒有 style 的元素套用佈景主題文字顏色 */
.species-theme #productLCAsummary thead th:not([style]) {
    color: var(--species-text-primary) !important;
}

/* orgLCAsummary 表格規則：若 tr 有指定字色底色，其內的 td 不套用佈景主題 */
/* 斑馬條紋只套用到沒有 style 的 tr */
.species-theme #orgLCAsummary tbody > tr:not([style]):nth-child(even) {
    background-color: var(--species-bg-secondary) !important;
}

.species-theme #orgLCAsummary tbody > tr:not([style]):nth-child(odd) {
    background-color: var(--species-bg-primary) !important;
}

.species-theme #orgLCAsummary tbody > tr:not([style]):hover {
    background-color: var(--species-bg-tertiary) !important;
}

/* 只為沒有 style 的 tr 內的 td 套用佈景主題文字顏色 */
.species-theme #orgLCAsummary tbody > tr:not([style]) td {
    color: var(--species-text-primary) !important;
}

/* 表單元素物種主題 */
.species-theme input, 
.species-theme textarea, 
.species-theme select {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border: 1px solid var(--species-border) !important;
}

.species-theme input:focus, 
.species-theme textarea:focus {
    border-color: var(--species-accent) !important;
    box-shadow: 0 0 5px var(--species-accent) !important;
}

.species-theme select {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
}

/* 表單組標籤 */
.species-theme .form-group label, 
.species-theme .col-form-label {
    color: var(--species-text-primary) !important;
}

/* 表單控制項 */
.species-theme .form-control {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border: 1px solid var(--species-border) !important;
}

.species-theme .form-control:focus {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
    border-color: var(--species-accent) !important;
    box-shadow: 0 0 5px var(--species-accent) !important;
}

/* 輸入組 */
.species-theme .input-group-text {
    background-color: var(--species-bg-tertiary) !important;
    color: var(--species-text-primary) !important;
    border: 1px solid var(--species-border) !important;
}

/* 表單驗證 */
.species-theme .form-control.is-valid {
    border-color: var(--species-success) !important;
}

.species-theme .form-control.is-invalid {
    border-color: var(--species-danger) !important;
}

.species-theme .valid-feedback {
    color: var(--species-success) !important;
}

.species-theme .invalid-feedback {
    color: var(--species-danger) !important;
}

/* 複選框和單選按鈕 */
.species-theme .form-check-input {
    background-color: var(--species-bg-secondary) !important;
    border: 1px solid var(--species-border) !important;
}

.species-theme .form-check-input:checked {
    background-color: var(--species-accent) !important;
    border-color: var(--species-accent) !important;
}

.species-theme .form-check-label {
    color: var(--species-text-primary) !important;
}

/* 按鈕物種主題 */
.species-theme .btn {
    background: linear-gradient(to right, var(--species-accent) 0%, var(--species-accent-hover) 100%) !important;
    border: 1px solid var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

.species-theme .btn:hover {
    background: linear-gradient(to right, var(--species-accent-hover) 0%, var(--species-accent) 100%) !important;
    color: var(--species-bg-primary) !important;
}

.species-theme .survey_order_btn, 
.species-theme .survey_order_btn_only, 
.species-theme .header_button, 
.species-theme .save_LCAInfo_btn {
    background: var(--species-bg-secondary) !important;
    color: var(--species-text-secondary) !important;
    border: 1px solid var(--species-border) !important;
}

.species-theme .survey_order_btn:hover, 
.species-theme .survey_order_btn_only:hover, 
.species-theme .header_button:hover, 
.species-theme .save_LCAInfo_btn:hover {
    background: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
    border-color: var(--species-accent) !important;
}

/* 側邊欄物種主題 */
.species-theme .side_bar {
    background-color: var(--species-bg-secondary) !important;
    border-right: 1px solid var(--species-border);
}

.species-theme .side_bar_right_vertical_line > div {
    background: var(--species-border) !important;
}

.species-theme a.Item div {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-secondary) !important;
}

.species-theme a.Item:hover div {
    background: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

.species-theme a.Item_Active div {
    background: var(--species-accent) !important;
    color: var(--species-bg-primary) !important;
}

/* 頁腳物種主題 */
.species-theme .copyright_wrap {
    background: var(--species-bg-secondary) !important;
    color: var(--species-text-secondary) !important;
    border-top: 1px solid var(--species-border);
}

.species-theme .copyright {
    color: var(--species-text-secondary) !important;
}

/* 標題物種主題 */
.species-theme .title, 
.species-theme .add_survey_header_title {
    color: var(--species-accent) !important;
}

/* 鏈接物種主題 */
.species-theme a {
    color: var(--species-text-primary) !important;
}

.species-theme a:hover {
    color: var(--species-accent) !important;
}

.species-theme .inline_link {
    color: var(--species-text-secondary) !important;
}

.species-theme .inline_link:hover {
    color: var(--species-accent) !important;
}

/* 輸入框佔位符物種主題 */
.species-theme ::-webkit-input-placeholder {
    color: var(--species-text-muted) !important;
}

.species-theme :-moz-placeholder {
    color: var(--species-text-muted) !important;
    opacity: 1;
}

.species-theme ::-moz-placeholder {
    color: var(--species-text-muted) !important;
    opacity: 1;
}

.species-theme :-ms-input-placeholder {
    color: var(--species-text-muted) !important;
}

/* 錯誤狀態物種主題 */
.species-theme .error {
    border-color: var(--species-danger) !important;
    box-shadow: 0 0 0 1px var(--species-danger) !important;
}

/* 選中狀態物種主題 */
.species-theme tbody > .survey_order_table_row:hover {
    background: var(--species-bg-tertiary) !important;
}

.species-theme tbody > .survey_order_table_row.selected {
    background: var(--species-bg-tertiary) !important;
}

/* 狀態標籤物種主題 */
.species-theme .label-inAnalyze {
    background-color: #9c27b0 !important; /* 紫色 */
}

.species-theme .label-inProgress {
    background-color: #4caf50 !important; /* 綠色 */
}

.species-theme .label-unSigned {
    background-color: #ffeb3b !important; /* 亮黃色 */
}

.species-theme .label-rejected {
    background-color: #f44336 !important; /* 紅色 */
}

.species-theme .label-signed {
    background-color: #2196f3 !important; /* 藍色 */
}

.species-theme .label-completed {
    background-color: #ff9800 !important; /* 橙色 */
}

/* 文化選擇面板物種主題 */
.species-theme .culture_panel {
    background: var(--species-bg-secondary) !important;
    border: 1px solid var(--species-border) !important;
}

.species-theme .culture_panel ul li {
    color: var(--species-text-primary) !important;
}

/* 滾動條物種主題 */
.species-theme ::-webkit-scrollbar {
    width: 8px;
}

.species-theme ::-webkit-scrollbar-track {
    background: var(--species-bg-primary);
}

.species-theme ::-webkit-scrollbar-thumb {
    background: var(--species-bg-tertiary);
    border-radius: 4px;
}

.species-theme ::-webkit-scrollbar-thumb:hover {
    background: var(--species-border);
}

/* 下拉選單物種主題 */
.species-theme .dropdown-menu {
    background-color: var(--species-bg-secondary) !important;
    border: 1px solid var(--species-border) !important;
    box-shadow: 0 4px 8px var(--species-shadow) !important;
}

.species-theme .dropdown-item {
    color: var(--species-text-primary) !important;
}

.species-theme .dropdown-item:hover, 
.species-theme .dropdown-item:focus {
    background-color: var(--species-bg-tertiary) !important;
    color: var(--species-text-primary) !important;
}

.species-theme .dropdown-divider {
    border-color: var(--species-border) !important;
}

/* 模態框物種主題 */
.species-theme .modal-content {
    background-color: var(--species-bg-secondary) !important;
    border: 1px solid var(--species-border) !important;
    color: var(--species-text-primary) !important;
}

.species-theme .modal-content label,
.species-theme .modal-content .col-form-label,
.species-theme .modal-content .row label {
    color: var(--species-text-primary) !important;
}

.species-theme .modal-content div,
.species-theme .modal-content span {
    color: var(--species-text-primary) !important;
}

/* 表單區域物種主題 */
.species-theme form,
.species-theme table-edit-modal,
.species-theme .edit_form {
    background-color: var(--species-bg-secondary) !important;
    color: var(--species-text-primary) !important;
}

.species-theme .edit_form label,
.species-theme .edit_form .col-form-label {
    color: var(--species-text-primary) !important;
}

.species-theme .modal-header {
    border-bottom: 1px solid var(--species-border) !important;
}

.species-theme .modal-footer {
    border-top: 1px solid var(--species-border) !important;
}

.species-theme .modal-title {
    color: var(--species-text-primary) !important;
}

/* 警告框物種主題 */
.species-theme .alert {
    background-color: var(--species-bg-tertiary) !important;
    border: 1px solid var(--species-border) !important;
    color: var(--species-text-primary) !important;
}

.species-theme .alert-success {
    background-color: rgba(76, 175, 80, 0.2) !important;
    border-color: var(--species-success) !important;
    color: #a5d6a7 !important;
}

.species-theme .alert-warning {
    background-color: rgba(255, 152, 0, 0.2) !important;
    border-color: var(--species-warning) !important;
    color: #ffcc02 !important;
}

.species-theme .alert-danger {
    background-color: rgba(244, 67, 54, 0.2) !important;
    border-color: var(--species-danger) !important;
    color: #ef9a9a !important;
}

.species-theme .alert-info {
    background-color: rgba(142, 36, 170, 0.2) !important;
    border-color: var(--species-border) !important;
    color: #ce93d8 !important;
}

/* 進度條物種主題 */
.species-theme .progress {
    background-color: var(--species-bg-tertiary) !important;
}

.species-theme .progress-bar {
    background-color: var(--species-accent) !important;
}

/* 響應式調整 */
@media screen and (max-width: 768px) {
    .species-theme .survey_form_body_wrap {
        margin: 10px 0px;
    }
    
    .species-theme .survey_form_body {
        padding: 8px 4px 8px 8px;
    }
}
