/**
 * RainLoop SquaresDark Theme - Light / Dark Mode System
 * Redesigned Color Palette & High Contrast Hierarchy
 */

/* ========================================================
   🌙 深色模式 (Dark Mode - Default)
   底層背景:   #0F1012 (Obsidian Dark)
   工具列背景: #14161A (Deep Slate)
   卡片/容器:  #181A20 (Card Surface)
   次級容器:   #1E2028 (Elevated Surface)
   主文字:     #F8FAFC (Pure White/Slate-50 - High Contrast)
   次文字:     #CBD5E1 (Slate-300 - Clear & Readable)
   三級文字:   #94A3B8 (Slate-400 - Snippets & Dates)
   邊框線:     #282B34 (Refined Dark Border)
   強調色:     #38BDF8 (Sky Blue) & #3B82F6 (Blue)
   未讀信件底: #172033 (Deep Indigo Navy)
   ======================================================== */

html.theme-dark,
body.theme-dark {
	background-color: #0F1012 !important;
	color: #F8FAFC !important;
}

html.theme-dark body,
html.theme-dark #rl-app,
html.theme-dark .thm-body {
	background-color: #0F1012 !important;
	color: #F8FAFC !important;
}

/* 頂部主工具列 */
html.theme-dark .b-system-drop-down .b-toolbar {
	background: #14161A !important;
	border-bottom: 1px solid #282B34 !important;
	color: #F8FAFC !important;
}

html.theme-dark .b-system-drop-down .b-toolbar .header {
	color: #F8FAFC !important;
}

/* 左側資料夾欄 & 設定選單欄 */
html.theme-dark #rl-left,
html.theme-dark .b-folders,
html.theme-dark .b-folders .b-content,
html.theme-dark .b-settings-menu {
	background-color: #14161A !important;
	color: #CBD5E1 !important;
	border-color: #282B34 !important;
}

html.theme-dark .b-folders .b-content .e-item .e-link,
html.theme-dark .b-settings-menu .e-item .e-link {
	color: #94A3B8 !important;
	transition: all 0.15s ease;
}

html.theme-dark .b-folders .b-content .e-item .e-link.selectable,
html.theme-dark .b-settings-menu .e-item.selectable .e-link {
	color: #CBD5E1 !important;
}

html.theme-dark .b-folders .b-content .e-item .e-link.selectable:hover,
html.theme-dark .b-settings-menu .e-item.selectable:hover .e-link {
	background-color: #1F222A !important;
	color: #FFFFFF !important;
}

html.theme-dark .b-folders .b-content .e-item .e-link.selectable.selected,
html.theme-dark .b-settings-menu .e-item.selectable.selected .e-link {
	background-color: #1E293B !important;
	color: #38BDF8 !important;
	font-weight: 600 !important;
	border-left: 3px solid #38BDF8 !important;
}

html.theme-dark .b-folders .b-content .e-item .count,
html.theme-dark .b-folders .b-content .e-item .unseen {
	color: #38BDF8 !important;
	font-weight: 700 !important;
}

html.theme-dark .b-folders .b-list-delimiter,
html.theme-dark .b-settings-menu .b-list-delimiter {
	border-color: #282B34 !important;
}

/* 寫信按鈕 */
html.theme-dark .btn.buttonCompose {
	background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
	color: #FFFFFF !important;
	border: 1px solid #3B82F6 !important;
	font-weight: 600 !important;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
	text-shadow: none !important;
}

html.theme-dark .btn.buttonCompose:hover {
	background: linear-gradient(135deg, #1D4ED8, #1E40AF) !important;
	border-color: #60A5FA !important;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5) !important;
}

/* ========================================================
   📬 郵件列表欄 (Message List) - 高對比重構
   ======================================================== */
html.theme-dark .messageList .b-message-list-wrapper {
	background-color: #14161A !important;
	border: 1px solid #282B34 !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

html.theme-dark .messageList .toolbar,
html.theme-dark .messageList .second-toolbar,
html.theme-dark .messageList .b-footer,
html.theme-dark .messageView .toolbar,
html.theme-dark .b-settins-right .b-toolbar {
	background-color: #14161A !important;
	border-color: #282B34 !important;
	color: #F8FAFC !important;
}

html.theme-dark .messageList .b-content {
	background-color: #14161A !important;
}

/* 基礎信件列項目 */
html.theme-dark .messageList .b-content .messageListItem {
	background-color: #181A20 !important;
	border-bottom: 1px solid #23262E !important;
	color: #CBD5E1 !important;
	transition: background-color 0.1s ease;
}

html.theme-dark .messageList .b-content .messageListItem:hover,
html.theme-dark .messageList .b-content .messageListItem.focused {
	background-color: #20232B !important;
}

html.theme-dark .messageList .b-content .messageListItem.selected {
	background-color: #1A263D !important;
}

/* ✨ 未讀信件 (Unseen) - 醒目高亮 */
html.theme-dark .messageList .b-content .messageListItem.unseen {
	background-color: #172033 !important;
}

html.theme-dark .messageList .b-content .messageListItem.unseen:hover {
	background-color: #1C2740 !important;
}

html.theme-dark .messageList .b-content .messageListItem.unseen .sidebarParent {
	background-color: #38BDF8 !important;
}

html.theme-dark .messageList .b-content .messageListItem.unseen .sender {
	color: #FFFFFF !important;
	font-weight: 700 !important;
	font-size: 13px !important;
}

html.theme-dark .messageList .b-content .messageListItem.unseen .subjectParent {
	color: #F8FAFC !important;
}

html.theme-dark .messageList .b-content .messageListItem.unseen .subjectParent .subject-prefix {
	color: #93C5FD !important;
	font-weight: 600 !important;
}

html.theme-dark .messageList .b-content .messageListItem.unseen .subjectParent .subject,
html.theme-dark .messageList .b-content .messageListItem.unseen .subjectParent .subject-suffix {
	color: #F1F5F9 !important;
	font-weight: 600 !important;
}

html.theme-dark .messageList .b-content .messageListItem.unseen .dateParent .date {
	color: #94A3B8 !important;
	font-weight: 600 !important;
}

/* ✉️ 已讀信件 - 舒適清爽 */
html.theme-dark .messageList .b-content .messageListItem:not(.unseen) {
	background-color: #14161A !important;
}

html.theme-dark .messageList .b-content .messageListItem:not(.unseen):hover {
	background-color: #1B1E25 !important;
}

html.theme-dark .messageList .b-content .messageListItem:not(.unseen) .sidebarParent {
	background-color: transparent !important;
}

html.theme-dark .messageList .b-content .messageListItem:not(.unseen) .sender {
	color: #CBD5E1 !important;
	font-weight: 500 !important;
}

html.theme-dark .messageList .b-content .messageListItem:not(.unseen) .subjectParent {
	color: #94A3B8 !important;
}

html.theme-dark .messageList .b-content .messageListItem:not(.unseen) .subjectParent .subject-prefix,
html.theme-dark .messageList .b-content .messageListItem:not(.unseen) .subjectParent .subject,
html.theme-dark .messageList .b-content .messageListItem:not(.unseen) .subjectParent .subject-suffix {
	color: #94A3B8 !important;
	font-weight: normal !important;
}

html.theme-dark .messageList .b-content .messageListItem:not(.unseen) .dateParent .date {
	color: #64748B !important;
	font-weight: normal !important;
}

/* 星標、複選框與分割線 */
html.theme-dark .messageList .b-content .messageListItem .flagOff i {
	color: #475569 !important;
}

html.theme-dark .messageList .b-content .messageListItem .flagOff:hover i {
	color: #FBBF24 !important;
}

html.theme-dark .messageList .b-content .messageListItem .flagOn i,
html.theme-dark .messageList .b-content .messageListItem .flagOnHalf i {
	color: #F59E0B !important;
}

html.theme-dark .messageList .b-content .messageListItem .checkboxMessage {
	color: #64748B !important;
}

html.theme-dark .messageList .b-content .messageListItem.checked .checkboxMessage {
	color: #38BDF8 !important;
}

html.theme-dark .messageList .b-content .messageListItem .attachment i {
	color: #94A3B8 !important;
}

html.theme-dark .messageList .delimiter,
html.theme-dark .messageList .mainDelimiter,
html.theme-dark .messageList .toolbarDelimiter,
html.theme-dark .messageList .footerDelimiter {
	background-color: #282B34 !important;
	border-color: #282B34 !important;
}

/* ========================================================
   📖 郵件檢視欄 (Message View) & 設定主卡片 (Settings)
   ======================================================== */
html.theme-dark .messageView .b-content,
html.theme-dark .b-settins-right .b-content,
html.theme-dark .b-settings-content {
	background-color: #181A20 !important;
	border: 1px solid #282B34 !important;
	color: #F8FAFC !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

html.theme-dark .messageItemHeader {
	background-color: #181A20 !important;
	border-bottom: 1px solid #282B34 !important;
	color: #F8FAFC !important;
}

html.theme-dark .messageItemHeader .subject {
	color: #FFFFFF !important;
	font-weight: 700 !important;
}

html.theme-dark .messageItemHeader .date,
html.theme-dark .messageItemHeader .from,
html.theme-dark .messageItemHeader .to,
html.theme-dark .messageView .b-content .b-message-view-desc,
html.theme-dark .messageView .b-content .b-message-view-checked-helper {
	color: #94A3B8 !important;
}

html.theme-dark .messageItemBody {
	color: #F1F5F9 !important;
	background-color: #181A20 !important;
}

/* ========================================================
   🛠️ 控制面板 (RainLoop Admin Panel) - 徹底修復空白底色
   ======================================================== */

/* 左側管理導覽欄 */
html.theme-dark .b-admin-left {
	background-color: #14161A !important;
	border-right: 1px solid #23262E !important;
}

html.theme-dark .b-admin-left .b-toolbar {
	background-color: #14161A !important;
}

html.theme-dark .b-admin-left .b-content {
	background-color: #14161A !important;
}

html.theme-dark .b-admin-menu .e-item .e-link {
	color: #94A3B8 !important;
	padding: 6px 14px !important;
	border-radius: 6px !important;
	margin: 2px 8px !important;
	transition: all 0.15s ease;
}

html.theme-dark .b-admin-menu .e-item.selectable:hover .e-link {
	background-color: #1F222A !important;
	color: #FFFFFF !important;
}

html.theme-dark .b-admin-menu .e-item.selectable.selected .e-link {
	background-color: #1E293B !important;
	color: #38BDF8 !important;
	font-weight: 600 !important;
	border-left: 3px solid #38BDF8 !important;
}

/* 右側主內容容器 - 根除下方大面積白色 */
html.theme-dark .b-admin-right {
	background-color: #0F1012 !important;
}

html.theme-dark .b-admin-right .b-toolbar {
	background-color: #14161A !important;
	color: #F8FAFC !important;
	border-bottom: 1px solid #23262E !important;
	text-shadow: none !important;
}

html.theme-dark .b-admin-right .b-toolbar h4 {
	color: #F8FAFC !important;
	text-shadow: none !important;
}

/* 核心容器背景覆蓋 (原為 #fff) */
html.theme-dark .b-admin-right .b-content {
	background-color: #14161A !important;
	border: 1px solid #282B34 !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
	border-radius: 8px !important;
}

html.theme-dark .b-admin-right .b-content .content,
html.theme-dark .b-admin-right .b-content .content-wrapper {
	background-color: transparent !important;
}

html.theme-dark .b-admin-right .b-settings-content {
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #F8FAFC !important;
}

html.theme-dark .b-admin-right .b-settings-content .legend,
html.theme-dark .legend {
	color: #F8FAFC !important;
	border-bottom: 1px solid #2E333F !important;
	font-size: 20px !important;
	font-weight: 600 !important;
	padding-bottom: 8px !important;
	margin-bottom: 20px !important;
}

/* 域名設定面板與表格 */
html.theme-dark .b-admin-domains .domain-desc,
html.theme-dark .b-domain-content .domain-desc {
	background-color: #1A1D24 !important;
	border: 1px solid #282B34 !important;
	border-left: 3px solid #38BDF8 !important;
	color: #CBD5E1 !important;
	border-radius: 4px !important;
}

html.theme-dark .b-admin-domains-list-table,
html.theme-dark .table {
	background-color: transparent !important;
	color: #E2E8F0 !important;
}

html.theme-dark .table th,
html.theme-dark .table td {
	border-top: 1px solid #23262E !important;
	color: #E2E8F0 !important;
}

html.theme-dark .table-hover tbody tr:hover td {
	background-color: #1E222B !important;
}

html.theme-dark .b-admin-domains-list-table .e-item .domain-name {
	color: #F8FAFC !important;
	font-weight: 500 !important;
}

html.theme-dark .b-admin-domains-list-table .e-item .domain-alias {
	color: #94A3B8 !important;
}

html.theme-dark .b-admin-domains-list-table .e-item .delete-domain,
html.theme-dark .b-admin-domains-list-table .e-item .disabled-domain {
	color: #94A3B8 !important;
}

html.theme-dark .b-admin-domains-list-table .e-item .delete-domain:hover {
	color: #F87171 !important;
}

html.theme-dark .b-admin-general .flag-name {
	color: #E2E8F0 !important;
	border-bottom: 1px dashed #64748B !important;
}

/* 勾選指示圖標 (綠色打勾) */
html.theme-dark .e-checkbox-icon {
	color: #34D399 !important;
}

/* ========================================================
   📝 表單元件、輸入框與按鈕 (Forms, Inputs, Buttons)
   ======================================================== */
html.theme-dark .control-label,
html.theme-dark label {
	color: #CBD5E1 !important;
	font-weight: 500 !important;
}

html.theme-dark .muted,
html.theme-dark .help-block,
html.theme-dark .help-inline {
	color: #94A3B8 !important;
}

html.theme-dark .well {
	background-color: #1A1D24 !important;
	border: 1px solid #282B34 !important;
	color: #CBD5E1 !important;
	border-radius: 6px !important;
}

/* 輸入框、下拉選單 */
html.theme-dark input[type="text"],
html.theme-dark input[type="password"],
html.theme-dark input[type="email"],
html.theme-dark input[type="number"],
html.theme-dark textarea,
html.theme-dark select {
	background-color: #1A1D24 !important;
	border: 1px solid #333742 !important;
	color: #F8FAFC !important;
	border-radius: 6px !important;
	padding: 6px 10px !important;
}

html.theme-dark input:focus,
html.theme-dark textarea:focus,
html.theme-dark select:focus {
	border-color: #38BDF8 !important;
	box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25) !important;
	outline: none !important;
	color: #FFFFFF !important;
}

/* 按鈕系列 */
html.theme-dark .btn {
	background-color: #1E222A !important;
	border: 1px solid #333742 !important;
	color: #E2E8F0 !important;
	border-radius: 6px !important;
	transition: all 0.15s ease;
}

html.theme-dark .btn:hover {
	background-color: #272C36 !important;
	border-color: #4B5263 !important;
	color: #FFFFFF !important;
}

html.theme-dark .btn.btn-primary {
	background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
	border-color: #3B82F6 !important;
	color: #FFFFFF !important;
	font-weight: 600 !important;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

html.theme-dark .btn.btn-primary:hover {
	background: linear-gradient(135deg, #1D4ED8, #1E40AF) !important;
	border-color: #60A5FA !important;
}

html.theme-dark .btn.btn-danger {
	background-color: #DC2626 !important;
	border-color: #EF4444 !important;
	color: #FFFFFF !important;
}

html.theme-dark .btn.btn-danger:hover {
	background-color: #B91C1C !important;
}

/* ========================================================
   🪟 彈窗與浮層 (Modals, Popups & Dropdowns)
   ======================================================== */
html.theme-dark .modal {
	background-color: #181A20 !important;
	border: 1px solid #2E333F !important;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
	color: #F8FAFC !important;
	border-radius: 10px !important;
}

html.theme-dark .modal-header,
html.theme-dark .modal-footer,
html.theme-dark .b-domain-content .modal-header,
html.theme-dark .b-domain-alias-content .modal-header,
html.theme-dark .b-plugin-content .modal-header,
html.theme-dark .popups .b-activate-content .modal-header {
	background-color: #14161A !important;
	border-color: #282B34 !important;
	color: #F8FAFC !important;
}

html.theme-dark .modal-body,
html.theme-dark .b-domain-content .modal-body {
	background-color: #181A20 !important;
	color: #F8FAFC !important;
}

html.theme-dark .dropdown-menu,
html.theme-dark .g-ui-menu {
	background-color: #1C1E25 !important;
	border: 1px solid #2E333F !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
	color: #F8FAFC !important;
	border-radius: 8px !important;
}

html.theme-dark .dropdown-menu > li > a,
html.theme-dark .g-ui-menu .e-item > .e-link {
	color: #CBD5E1 !important;
}

html.theme-dark .dropdown-menu > li > a:hover,
html.theme-dark .g-ui-menu .e-item > .e-link:hover {
	background-color: #252833 !important;
	color: #FFFFFF !important;
}

html.theme-dark .dropdown-menu .divider {
	border-bottom-color: #282B34 !important;
	background-color: #282B34 !important;
}


/* ========================================================
   ☀️ 淺色模式 (Light Mode - Modern Clean)
   底層背景:   #F8FAFC
   工具列背景: #FFFFFF
   主文字:     #0F172A
   次文字:     #475569
   邊框線:     #E2E8F0
   未讀信件底: #EFF6FF
   ======================================================== */
html.theme-light,
body.theme-light {
	background-color: #F8FAFC !important;
	color: #0F172A !important;
}

html.theme-light body,
html.theme-light #rl-app,
html.theme-light .thm-body {
	background-color: #F8FAFC !important;
	background-image: none !important;
	color: #0F172A !important;
}

/* 頂部主工具列 */
html.theme-light .b-system-drop-down .b-toolbar {
	background: #FFFFFF !important;
	border-bottom: 1px solid #E2E8F0 !important;
	color: #0F172A !important;
}

/* 左側資料夾欄 & 設定選單欄 */
html.theme-light #rl-left,
html.theme-light .b-folders,
html.theme-light .b-folders .b-content,
html.theme-light .b-settings-menu {
	background-color: #F8FAFC !important;
	color: #334155 !important;
	border-color: #E2E8F0 !important;
}

html.theme-light .b-folders .b-content .e-item .e-link,
html.theme-light .b-settings-menu .e-item .e-link {
	color: #64748B !important;
}

html.theme-light .b-folders .b-content .e-item .e-link.selectable,
html.theme-light .b-settings-menu .e-item.selectable .e-link {
	color: #334155 !important;
}

html.theme-light .b-folders .b-content .e-item .e-link.selectable:hover,
html.theme-light .b-settings-menu .e-item.selectable:hover .e-link {
	background-color: #FFFFFF !important;
	color: #0F172A !important;
}

html.theme-light .b-folders .b-content .e-item .e-link.selectable.selected,
html.theme-light .b-settings-menu .e-item.selectable.selected .e-link {
	background-color: #EFF6FF !important;
	color: #2563EB !important;
	font-weight: 700 !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
	border-left: 3px solid #2563EB !important;
}

html.theme-light .b-folders .b-list-delimiter,
html.theme-light .b-settings-menu .b-list-delimiter {
	border-color: #E2E8F0 !important;
}

/* 寫信按鈕 */
html.theme-light .btn.buttonCompose {
	background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
	color: #FFFFFF !important;
	border: 1px solid #2563EB !important;
	font-weight: 600 !important;
	box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

html.theme-light .btn.buttonCompose:hover {
	background: linear-gradient(135deg, #1D4ED8, #1E40AF) !important;
}

/* 郵件列表欄 (Message List) */
html.theme-light .messageList .b-message-list-wrapper {
	background-color: #FFFFFF !important;
	border: 1px solid #E2E8F0 !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

html.theme-light .messageList .toolbar,
html.theme-light .messageList .second-toolbar,
html.theme-light .messageList .b-footer,
html.theme-light .messageView .toolbar,
html.theme-light .b-settins-right .b-toolbar {
	background-color: #F8FAFC !important;
	border-color: #E2E8F0 !important;
	color: #0F172A !important;
}

html.theme-light .messageList .b-content {
	background-color: #FFFFFF !important;
}

/* 基礎信件列項目 */
html.theme-light .messageList .b-content .messageListItem {
	background-color: #FFFFFF !important;
	border-bottom: 1px solid #F1F5F9 !important;
	color: #334155 !important;
}

html.theme-light .messageList .b-content .messageListItem:hover,
html.theme-light .messageList .b-content .messageListItem.focused {
	background-color: #F1F5F9 !important;
}

html.theme-light .messageList .b-content .messageListItem.selected {
	background-color: #DBEAFE !important;
}

/* 未讀信件 (Unseen) */
html.theme-light .messageList .b-content .messageListItem.unseen {
	background-color: #EFF6FF !important;
}

html.theme-light .messageList .b-content .messageListItem.unseen:hover {
	background-color: #E0E7FF !important;
}

html.theme-light .messageList .b-content .messageListItem.unseen .sidebarParent {
	background-color: #2563EB !important;
}

html.theme-light .messageList .b-content .messageListItem.unseen .sender {
	color: #0F172A !important;
	font-weight: 700 !important;
}

html.theme-light .messageList .b-content .messageListItem.unseen .subjectParent {
	color: #0F172A !important;
}

html.theme-light .messageList .b-content .messageListItem.unseen .subjectParent .subject-prefix {
	color: #1D4ED8 !important;
	font-weight: 600 !important;
}

html.theme-light .messageList .b-content .messageListItem.unseen .subjectParent .subject,
html.theme-light .messageList .b-content .messageListItem.unseen .subjectParent .subject-suffix {
	color: #0F172A !important;
	font-weight: 600 !important;
}

html.theme-light .messageList .b-content .messageListItem.unseen .dateParent .date {
	color: #475569 !important;
	font-weight: 600 !important;
}

/* 已讀信件 */
html.theme-light .messageList .b-content .messageListItem:not(.unseen) {
	background-color: #FFFFFF !important;
}

html.theme-light .messageList .b-content .messageListItem:not(.unseen) .sidebarParent {
	background-color: transparent !important;
}

html.theme-light .messageList .b-content .messageListItem:not(.unseen) .sender {
	color: #334155 !important;
	font-weight: 500 !important;
}

html.theme-light .messageList .b-content .messageListItem:not(.unseen) .subjectParent .subject-prefix,
html.theme-light .messageList .b-content .messageListItem:not(.unseen) .subjectParent .subject,
html.theme-light .messageList .b-content .messageListItem:not(.unseen) .subjectParent .subject-suffix {
	color: #64748B !important;
}

html.theme-light .messageList .b-content .messageListItem:not(.unseen) .dateParent .date {
	color: #94A3B8 !important;
}

html.theme-light .messageList .delimiter,
html.theme-light .messageList .mainDelimiter,
html.theme-light .messageList .toolbarDelimiter,
html.theme-light .messageList .footerDelimiter {
	background-color: #E2E8F0 !important;
	border-color: #E2E8F0 !important;
}

/* 郵件檢視欄 (Message View) & 設定主卡片 */
html.theme-light .messageView .b-content,
html.theme-light .b-settins-right .b-content,
html.theme-light .b-settings-content {
	background-color: #FFFFFF !important;
	border: 1px solid #E2E8F0 !important;
	color: #0F172A !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

html.theme-light .messageItemHeader {
	background-color: #FFFFFF !important;
	border-bottom: 1px solid #E2E8F0 !important;
	color: #0F172A !important;
}

html.theme-light .messageItemHeader .subject {
	color: #0F172A !important;
	font-weight: 700 !important;
}

html.theme-light .messageItemHeader .date,
html.theme-light .messageItemHeader .from,
html.theme-light .messageItemHeader .to,
html.theme-light .messageView .b-content .b-message-view-desc,
html.theme-light .messageView .b-content .b-message-view-checked-helper {
	color: #64748B !important;
}

html.theme-light .messageItemBody {
	color: #0F172A !important;
}

/* 控制面板淺色模式 */
html.theme-light .b-admin-left {
	background-color: #F8FAFC !important;
	border-right: 1px solid #E2E8F0 !important;
}

html.theme-light .b-admin-right .b-toolbar {
	background-color: #FFFFFF !important;
	border-bottom: 1px solid #E2E8F0 !important;
	color: #0F172A !important;
}

html.theme-light .b-admin-right .b-content {
	background-color: #FFFFFF !important;
	border: 1px solid #E2E8F0 !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

html.theme-light .b-admin-right .b-settings-content {
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #0F172A !important;
}

/* 表單、輸入框與按鈕 (淺色) */
html.theme-light .legend {
	color: #0F172A !important;
	border-bottom: 1px solid #E2E8F0 !important;
}

html.theme-light .control-label,
html.theme-light label {
	color: #334155 !important;
}

html.theme-light .muted,
html.theme-light .help-block,
html.theme-light .help-inline {
	color: #64748B !important;
}

html.theme-light .well {
	background-color: #F8FAFC !important;
	border: 1px solid #E2E8F0 !important;
	color: #334155 !important;
}

html.theme-light input[type="text"],
html.theme-light input[type="password"],
html.theme-light input[type="email"],
html.theme-light input[type="number"],
html.theme-light textarea,
html.theme-light select {
	background-color: #FFFFFF !important;
	border: 1px solid #CBD5E1 !important;
	color: #0F172A !important;
	border-radius: 6px !important;
}

html.theme-light input:focus,
html.theme-light textarea:focus,
html.theme-light select:focus {
	border-color: #2563EB !important;
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
}

html.theme-light .btn {
	background-color: #FFFFFF !important;
	border: 1px solid #CBD5E1 !important;
	color: #334155 !important;
	border-radius: 6px !important;
}

html.theme-light .btn:hover {
	background-color: #F8FAFC !important;
	border-color: #94A3B8 !important;
	color: #0F172A !important;
}

html.theme-light .btn.btn-primary {
	background: linear-gradient(135deg, #2563EB, #1D4ED8) !important;
	border-color: #2563EB !important;
	color: #FFFFFF !important;
	font-weight: 600 !important;
}

/* 彈窗與浮層 (淺色) */
html.theme-light .modal {
	background-color: #FFFFFF !important;
	border: 1px solid #E2E8F0 !important;
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12) !important;
	color: #0F172A !important;
	border-radius: 10px !important;
}

html.theme-light .modal-header,
html.theme-light .modal-footer,
html.theme-light .b-domain-content .modal-header,
html.theme-light .b-domain-alias-content .modal-header,
html.theme-light .b-plugin-content .modal-header,
html.theme-light .popups .b-activate-content .modal-header {
	background-color: #F8FAFC !important;
	border-color: #E2E8F0 !important;
	color: #0F172A !important;
}

html.theme-light .modal-body {
	background-color: #FFFFFF !important;
	color: #0F172A !important;
}

html.theme-light .dropdown-menu,
html.theme-light .g-ui-menu {
	background-color: #FFFFFF !important;
	border: 1px solid #E2E8F0 !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
	color: #0F172A !important;
	border-radius: 8px !important;
}

html.theme-light .dropdown-menu > li > a,
html.theme-light .g-ui-menu .e-item > .e-link {
	color: #334155 !important;
}

html.theme-light .dropdown-menu > li > a:hover,
html.theme-light .g-ui-menu .e-item > .e-link:hover {
	background-color: #F1F5F9 !important;
	color: #2563EB !important;
}

html.theme-light .dropdown-menu .divider {
	border-bottom-color: #E2E8F0 !important;
	background-color: #E2E8F0 !important;
}


/* ========================================================
   🎛️ 主題模式切換器 UI 元件樣式
   ======================================================== */

.rl-theme-mode-buttons .btn {
	padding: 6px 16px;
	font-size: 13px;
	cursor: pointer;
	border-radius: 6px;
	transition: all 0.2s ease;
}

html.theme-dark .rl-theme-mode-buttons .btn.active {
	background: #38BDF8 !important;
	color: #0F1012 !important;
	border-color: #38BDF8 !important;
	font-weight: 700;
}

html.theme-light .rl-theme-mode-buttons .btn.active {
	background: #2563EB !important;
	color: #FFFFFF !important;
	border-color: #2563EB !important;
	font-weight: 700;
}

.rl-top-theme-toggle .btn {
	padding: 4px 10px;
	border-radius: 6px;
	cursor: pointer;
	line-height: 20px;
}

/* 懸浮膠囊切換按鈕 (Glassmorphism Capsule) */
.rl-theme-toggle-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	user-select: none;
}

html.theme-dark .rl-theme-toggle-btn {
	background: rgba(24, 26, 32, 0.85) !important;
	backdrop-filter: blur(12px) !important;
	-webkit-backdrop-filter: blur(12px) !important;
	color: #F8FAFC !important;
	border: 1px solid rgba(255, 255, 255, 0.12) !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
}

html.theme-dark .rl-theme-toggle-btn:hover {
	background: rgba(32, 35, 43, 0.95) !important;
	border-color: #38BDF8 !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(56, 189, 248, 0.2) !important;
}

html.theme-light .rl-theme-toggle-btn {
	background: rgba(255, 255, 255, 0.9) !important;
	backdrop-filter: blur(12px) !important;
	-webkit-backdrop-filter: blur(12px) !important;
	color: #0F172A !important;
	border: 1px solid rgba(0, 0, 0, 0.1) !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
}

html.theme-light .rl-theme-toggle-btn:hover {
	background: #FFFFFF !important;
	border-color: #2563EB !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15) !important;
}
