/* ===== 深灰主题 v3（2026-10-31 加深版）=====
   在 light-theme.css 之后加载：整套换成偏黑的深炭灰。
   色阶：页面底 #050c18 → 卡片 #0a1626 → 次级块 #0e1d30 → 输入框 #071120 → 侧栏 #030910
   文字反向适配为浅灰，避免深底看不见。投屏画布保持纯黑。
   回滚：删掉 index.html 里的 gray-theme.css 那一行即可回到白色。 */

:root{
  --gray-page:   #050c18;
  --gray-panel:  #0a1626;
  --gray-sub:    #0e1d30;
  --gray-input:  #071120;
  --gray-side:   #030910;
  --gray-line:   #17304a;
  --gray-ink:    #eaf9ff;
  --gray-muted:  #9fc0d6;
  --gray-dim:    #7b838c;

  --background: #050c18;
  --foreground: #eaf9ff;
  --card: #0a1626;
  --card-foreground: #eaf9ff;
  --popover: #0b1a2c;
  --popover-foreground: #eaf9ff;
  --muted: #0e1d30;
  --muted-foreground: #9fc0d6;
  --accent: #102236;
  --accent-foreground: #eaf9ff;
  --border: #17304a;
  --input: #17304a;
  --secondary: #0e1d30;
  --secondary-foreground: #eaf9ff;

  --sidebar: 210 10% 12%;
  --sidebar-background: 210 10% 12%;
  --sidebar-foreground: 210 12% 88%;
  --sidebar-accent: 210 9% 18%;
  --sidebar-accent-foreground: 210 12% 92%;
  --sidebar-border: #17304a;
}

html, body, #root { background-color: #050c18 !important; color: #eaf9ff !important; }

/* ===== 页面底 / 卡片 / 次级块 ===== */
[class*="bg-[#050c18]"]      { background-color: #050c18 !important; }
[class*="bg-[#050c18]/80"]   { background-color: rgba(5,12,24,.94) !important; }
[class*="bg-[#040a14]"]      { background-color: #050c18 !important; }
[class*="bg-[#050c18]"]      { background-color: #050c18 !important; }
[class*="bg-[#08131f]"]      { background-color: #0a1626 !important; }
[class*="bg-[#071220]"]      { background-color: #343a40 !important; }
[class*="bg-[#1c1c1c]"]      { background-color: #0a1626 !important; }
[class*="bg-[#1c2333]"]      { background-color: #323840 !important; }
[class*="bg-[#08131f]"]      { background-color: #0e1d30 !important; }
[class*="bg-[#2d333b]"]      { background-color: #3d434a !important; }
[class*="bg-[#262c36]"]      { background-color: #353b42 !important; }
[class*="bg-[#14283c]"]      { background-color: #42484f !important; }
[class*="bg-[#183349]"]      { background-color: #1b3a55 !important; }
[class*="bg-white/15"]       { background-color: rgba(255,255,255,.13) !important; }
[class*="bg-white/10"]       { background-color: rgba(255,255,255,.08) !important; }
.bg-white                    { background-color: #0a1626 !important; }

/* ===== 渐变 ===== */
[class*="from-[#050c18]"] { --tw-gradient-from: #050c18 !important; }
[class*="to-[#050c18]"]   { --tw-gradient-to: #050c18 !important; }
[class*="via-[#050c18]"]  { --tw-gradient-via: #050c18 !important; }
[class*="from-[#08131f]"] { --tw-gradient-from: #0a1626 !important; }
[class*="to-[#08131f]"]   { --tw-gradient-to: #0a1626 !important; }
[class*="via-[#08131f]"]  { --tw-gradient-via: #0a1626 !important; }

/* ===== 边框统一灰线（深底用中灰线）===== */
[class*="border-[#14283c]"], [class*="border-[#08131f]"],
[class*="border-[#3a4250]"], [class*="border-[#071220]"],
[class*="border-[#183349]"], [class*="border-[#7fa3bd]"],
.border-sidebar-border, [class*="border-sidebar-border"] {
  border-color: #17304a !important;
}

/* ===== 文字：反向适配为浅色 ===== */
.text-white { color: #f2f5f7 !important; }
.text-gray-100, .text-gray-200, .text-gray-300,
.text-slate-100, .text-slate-200, .text-slate-300,
.text-zinc-100, .text-zinc-200, .text-zinc-300 {
  color: #e6f6ff !important;
}
.text-gray-400, .text-slate-400, .text-zinc-400, .text-neutral-400 {
  color: #9fc0d6 !important;
}
[class*="text-[#9aa0a6]"] { color: #a9b0b8 !important; }
[class*="text-[#183349]"] { color: #8b939b !important; }
[class*="text-[#6e7681]"] { color: #9aa2aa !important; }

/* 彩色强调文字：深底上提亮 */
.text-blue-400    { color: #7eb0f8 !important; }
.text-sky-400     { color: #6ec5ee !important; }
.text-cyan-400    { color: #5fd3d8 !important; }
.text-teal-400    { color: #4fd1b5 !important; }
.text-emerald-400 { color: #4fd39a !important; }
.text-green-400   { color: #62d47e !important; }
.text-lime-400    { color: #a8d653 !important; }
.text-yellow-400  { color: #e3c04a !important; }
.text-amber-400   { color: #f0b95c !important; }
.text-orange-400  { color: #f59b62 !important; }
.text-red-400     { color: #f38a8a !important; }
.text-rose-400    { color: #f58ba5 !important; }
.text-pink-400    { color: #f492c0 !important; }
.text-fuchsia-400 { color: #e0a0f2 !important; }
.text-purple-400  { color: #c1a3f0 !important; }
.text-violet-400  { color: #a9a4f5 !important; }
.text-indigo-400  { color: #9aa4f8 !important; }
[class*="text-[#22c55e]"], [class*="text-[#00e676]"] { color: #4ade80 !important; }
[class*="text-[#58a6ff]"] { color: #79b8ff !important; }
[class*="text-[#ff1744]"] { color: #ff6b6b !important; }

/* ===== 输入框 / 下拉 / 文本域（比卡片更深，凹进去）===== */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea, select {
  background-color: #071120 !important;
  color: #eef1f3 !important;
  border-color: #17304a !important;
}
input::placeholder, textarea::placeholder { color: #7b838c !important; }
input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus, select:focus {
  border-color: #7d858e !important;
  box-shadow: 0 0 0 3px rgba(180,190,200,.12) !important;
}
input[type="checkbox"], input[type="radio"] { background-color: #071120 !important; border-color: #20425e !important; }

/* ===== 表格 ===== */
table, tbody, td, th { background-color: transparent !important; }
thead tr { background-color: #0e1d30 !important; }
tbody tr { background-color: #0a1626 !important; }
tr:hover, tbody tr:hover { background-color: #383e45 !important; }
th { color: #cfd5db !important; }

/* 卡片容器：靠边线分层，不要阴影 */
[class*="bg-[#08131f]"]:not(button):not(a) { box-shadow: none !important; }

/* ===== 工具条按钮 / 分页按钮 ===== */
button[class*="bg-[#08131f]"], a[class*="bg-[#08131f]"] {
  background-color: #0e1d30 !important;
  border-color: #1b3a55 !important;
  color: #e6f6ff !important;
  box-shadow: none !important;
}
button[class*="bg-[#08131f]"]:hover, a[class*="bg-[#08131f]"]:hover {
  background-color: #434a51 !important;
  border-color: #5c646c !important;
}
[class*="hover:bg-[#08131f]"]:hover { background-color: #3c4249 !important; }
[class*="hover:bg-[#071220]"]:hover { background-color: #383e45 !important; }
[class*="hover:bg-[#14283c]"]:hover { background-color: #183349 !important; }

/* ===== 侧边栏（更黑一档，和主区拉开层次）===== */
aside, nav, [data-slot="sidebar"], .bg-sidebar {
  background-color: #030910 !important;
  border-color: #102236 !important;
}
[data-slot="sidebar-inset"] { background-color: #050c18 !important; }
.bg-sidebar-accent { background-color: #2a2f34 !important; }
.text-sidebar-foreground, .text-sidebar-accent-foreground { color: #dfe4e8 !important; }
aside a:hover, aside button:hover { background-color: #282d32 !important; }
[data-slot="sidebar-container"] { border-right: none !important; box-shadow: 1px 0 0 #102236 !important; }

/* 侧边栏品牌文字：深底改亮字 */
.bg-sidebar span[class*="bg-clip-text"],
aside span[class*="bg-clip-text"],
[data-slot="sidebar"] span[class*="bg-clip-text"] { color: #f2fbff !important; -webkit-text-fill-color: #f2fbff !important; }

/* ===== 头部栏 ===== */
header, [class*="sticky"][class*="bg-[#08131f]"], [class*="sticky"][class*="bg-[#050c18]"] {
  background-color: #23272b !important;
  border-bottom: 1px solid #102236 !important;
}

/* ===== 下拉菜单 / 弹窗 / 提示框 ===== */
[role="menu"], [data-slot="dropdown-menu-content"], [data-slot="popover-content"],
[data-radix-popper-content-wrapper] > div {
  background: #0b1a2c !important;
  border-color: #1b3a55 !important;
  color: #eaf9ff !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.55) !important;
}
[role="menuitem"]:hover, [role="menuitem"][data-highlighted],
[role="menuitemcheckbox"]:hover, [role="menuitemradio"]:hover {
  background: #3f454c !important;
}
[role="separator"], [data-slot="dropdown-menu-separator"] { background: #1b3a55 !important; }

/* 弹层遮罩与对话框 */
[data-slot="dialog-content"], [role="dialog"] {
  background-color: #0a1626 !important;
  border-color: #1b3a55 !important;
  color: #eaf9ff !important;
}
[class*="bg-black/"] { background-color: rgba(0,0,0,.62) !important; }

/* ===== 代码块 ===== */
pre, code { background-color: #1d2125 !important; color: #dfe4e8 !important; }

/* ===== 分页 ===== */
.RaPagination-root button, .MuiTablePagination-root button,
.RaPagination-root .MuiButtonBase-root, .MuiTablePagination-root .MuiButtonBase-root {
  background-color: #0e1d30 !important;
  border: 1px solid #1b3a55 !important;
  color: #e6f6ff !important;
}
.RaPagination-root button:hover, .MuiTablePagination-root button:hover { background-color: #434a51 !important; }
.RaPagination-root .Mui-selected, .MuiTablePagination-root .Mui-selected {
  background-color: #b9c0c7 !important; color: #030910 !important; border-color: #b9c0c7 !important;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #030910; }
::-webkit-scrollbar-thumb { background: #1b3a55; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #5f676f; }

/* ===== 提示条（toast）===== */
[data-sonner-toaster] {
  --normal-bg: #0b1a2c !important;
  --normal-text: #eaf9ff !important;
  --normal-border: #1b3a55 !important;
}

/* ===== 登录页 ===== */
.login-split { background: linear-gradient(160deg, #2b3035 0%, #202427 55%, #191c1f 100%) !important; }
.login-split > div:nth-child(2) {
  background: #2d3238 !important;
  border: 1px solid #17304a !important;
  box-shadow: 0 18px 52px rgba(0,0,0,.55) !important;
}
.login-split h1 { color: #f2fbff !important; }
.login-split p, .login-split span { color: #a9b0b8 !important; }
.login-split label { color: #c8ced5 !important; }
.login-split input:not([type="checkbox"]) {
  background: #071220 !important;
  border-color: #17304a !important;
  color: #eef1f3 !important;
}
.login-split input::placeholder { color: #79818a !important; }
.login-split input[type="checkbox"] { background: #071220 !important; border-color: #20425e !important; }
.login-split button[type="submit"] {
  background: #3b4148 !important;
  color: #f2f5f7 !important;
  border: 1px solid #20425e !important;
}
.login-split button[type="submit"]:hover:not(:disabled) { background: #183349 !important; border-color: #6a727a !important; }
.login-split button[type="submit"] svg { color: #eaf9ff !important; }

/* ===== 设备管理 / 设备控制页 ===== */
main, section, article { border-color: #17304a !important; }
main [class*="rounded-xl"], main [class*="rounded-2xl"] { border-color: #17304a !important; }

/* 投屏画布保持纯黑（必须），只把外框改灰 */
main canvas { background-color: #000 !important; }
[class*="bg-[#000]"], .bg-black { background-color: #0a0c0e !important; }
.bg-black .text-white, .bg-black.text-white,
[class*="bg-[#000"] .text-white,
[style*="#000"] .text-white { color: #ffffff !important; }

/* 徽标底色：深底上改成半透明彩色，不再是一块块发白 */
[class*="bg-blue-500/"]    { background-color: rgba(59,130,246,.20) !important; }
[class*="bg-sky-500/"]     { background-color: rgba(14,165,233,.20) !important; }
[class*="bg-cyan-500/"]    { background-color: rgba(6,182,212,.20) !important; }
[class*="bg-teal-500/"]    { background-color: rgba(20,184,166,.20) !important; }
[class*="bg-emerald-500/"] { background-color: rgba(16,185,129,.20) !important; }
[class*="bg-green-500/"]   { background-color: rgba(34,197,94,.20) !important; }
[class*="bg-lime-500/"]    { background-color: rgba(132,204,22,.20) !important; }
[class*="bg-yellow-500/"]  { background-color: rgba(234,179,8,.20) !important; }
[class*="bg-amber-500/"]   { background-color: rgba(245,158,11,.20) !important; }
[class*="bg-orange-500/"]  { background-color: rgba(249,115,22,.20) !important; }
[class*="bg-red-500/"]     { background-color: rgba(239,68,68,.20) !important; }
[class*="bg-rose-500/"]    { background-color: rgba(244,63,94,.20) !important; }
[class*="bg-pink-500/"]    { background-color: rgba(236,72,153,.20) !important; }
[class*="bg-fuchsia-500/"] { background-color: rgba(217,70,239,.20) !important; }
[class*="bg-purple-500/"]  { background-color: rgba(168,85,247,.20) !important; }
[class*="bg-violet-500/"]  { background-color: rgba(139,92,246,.20) !important; }
[class*="bg-indigo-500/"]  { background-color: rgba(99,102,241,.20) !important; }
[class*="bg-blue-500/"], [class*="bg-sky-500/"], [class*="bg-cyan-500/"],
[class*="bg-teal-500/"], [class*="bg-emerald-500/"], [class*="bg-green-500/"],
[class*="bg-lime-500/"], [class*="bg-yellow-500/"], [class*="bg-amber-500/"],
[class*="bg-orange-500/"], [class*="bg-red-500/"], [class*="bg-rose-500/"],
[class*="bg-pink-500/"], [class*="bg-fuchsia-500/"], [class*="bg-purple-500/"],
[class*="bg-violet-500/"], [class*="bg-indigo-500/"] {
  border: 1px solid rgba(255,255,255,.10) !important;
}

/* 状态点 */
[class*="bg-[#22c55e]"], [class*="bg-[#00e676]"] { background-color: #22c55e !important; }
[class*="bg-[#58a6ff]"] { background-color: #3b82f6 !important; }
[class*="bg-[#ff1744]"] { background-color: #ef4444 !important; }

/* 内联样式兜底 */
[style*="#08131f"] { background-color: #0a1626 !important; }
[style*="#050c18"] { background-color: #050c18 !important; }
[style*="#08131f"] { background-color: #0e1d30 !important; }

/* ===== v4 文字提亮（2026-10-31 修复「字看不清」）=====
   目标：所有文字在深炭灰底上清晰明亮。
   - 正文/标题 → 近纯白
   - 次要信息 → 亮灰（不再掉到 #9fc0d6 以下）
   - 原先的 text-gray-500/600/700/800/900 深灰字全部提亮
   - 内联深色（#3f3f3f、#24486a 等）一并兜底
   回滚：删掉本文件 v4 段落即可。 */

:root{
  --gray-ink:    #ffffff;
  --gray-muted:  #dff4ff;
  --gray-dim:    #c0c8cf;

  --foreground: #f6fdff;
  --card-foreground: #f6fdff;
  --popover-foreground: #f6fdff;
  --muted-foreground: #dff4ff;
  --accent-foreground: #ffffff;
  --secondary-foreground: #ffffff;

  --sidebar-foreground: 210 16% 97%;
  --sidebar-accent-foreground: 210 16% 99%;
}

/* ---------- 基础：整体默认字色提亮 ---------- */
html, body, #root { color: #f6fdff !important; }
/* v8: 标签级通用规则已移除，避免压掉程序自带的文字类 */

/* ---------- 灰阶字：全部抬到高对比 ---------- */
.text-white { color: #ffffff !important; }

.text-gray-100, .text-slate-100, .text-zinc-100, .text-neutral-100, .text-stone-100 { color: #ffffff !important; }
.text-gray-200, .text-slate-200, .text-zinc-200, .text-neutral-200, .text-stone-200 { color: #f6fdff !important; }
.text-gray-300, .text-slate-300, .text-zinc-300, .text-neutral-300, .text-stone-300 { color: #ecf1f5 !important; }
.text-gray-400, .text-slate-400, .text-zinc-400, .text-neutral-400, .text-stone-400 { color: #d6dde4 !important; }
.text-gray-500, .text-slate-500, .text-zinc-500, .text-neutral-500, .text-stone-500 { color: #c6cfd7 !important; }
.text-gray-600, .text-slate-600, .text-zinc-600, .text-neutral-600, .text-stone-600 { color: #bcc5cd !important; }
.text-gray-700, .text-slate-700, .text-zinc-700, .text-neutral-700, .text-stone-700 { color: #d8eefc !important; }
.text-gray-800, .text-slate-800, .text-zinc-800, .text-neutral-800, .text-stone-800 { color: #dfe6ec !important; }
.text-gray-900, .text-slate-900, .text-zinc-900, .text-neutral-900, .text-stone-900,
.text-black { color: #eaf0f5 !important; }

/* 带透明度后缀的同类（text-gray-500/80 等）一并兜底 */
[class*="text-gray-500"], [class*="text-slate-500"], [class*="text-zinc-500"] { color: #c6cfd7 !important; }
[class*="text-gray-600"], [class*="text-slate-600"], [class*="text-zinc-600"] { color: #bcc5cd !important; }
[class*="text-gray-700"], [class*="text-slate-700"], [class*="text-zinc-700"] { color: #d8eefc !important; }
[class*="text-gray-800"], [class*="text-slate-800"], [class*="text-zinc-800"] { color: #dfe6ec !important; }
[class*="text-gray-900"], [class*="text-slate-900"], [class*="text-zinc-900"] { color: #eaf0f5 !important; }

/* ---------- 十六进制字色类（含 light-theme 里被压暗的那批）---------- */
[class*="text-[#e6edf3]"], [class*="text-[#c9d1d9]"] { color: #f6fdff !important; }
[class*="text-[#7fa3bd]"], [class*="text-[#9aa0a6]"], [class*="text-[#9ca3af]"] { color: #d8eefc !important; }
[class*="text-[#6e7681]"], [class*="text-[#848d97]"] { color: #c8d1d9 !important; }
[class*="text-[#183349]"], [class*="text-[#24486a]"], [class*="text-[#14283c]"] { color: #bcc5cd !important; }
[class*="text-[#1f2328]"], [class*="text-[#24292f]"], [class*="text-[#050c18]"] { color: #f0f5f9 !important; }

/* 内联 style 兜底（深色字在深底上不可见）*/
[style*="color:#3f3f3f"], [style*="color: #3f3f3f"],
[style*="color:#333"], [style*="color: #333"],
[style*="color:#1f2328"], [style*="color: #1f2328"],
[style*="color:#24292f"], [style*="color: #24292f"],
[style*="color:#24486a"], [style*="color: #24486a"],
[style*="color:#6e7781"], [style*="color: #6e7781"],
[style*="color:#183349"], [style*="color: #183349"],
[style*="color:#7fa3bd"], [style*="color: #7fa3bd"] { color: #e6edf3 !important; }

/* ---------- 表格 ---------- */
th { color: #ffffff !important; }
td { color: #eef3f7 !important; }
thead tr th, table thead th { color: #ffffff !important; }
.MuiTableCell-root, .RaDatagrid-headerCell, .RaDatagrid-rowCell { color: #eef3f7 !important; }
.RaDatagrid-headerCell { color: #ffffff !important; }

/* ---------- 表单 / 输入 ---------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
textarea, select {
  color: #ffffff !important;
}
input::placeholder, textarea::placeholder { color: #b3bcc4 !important; }
label, .label { color: #e8eef3 !important; }

button:disabled, [disabled], .disabled { color: #aeb7bf !important; }

/* ---------- 侧边栏 ---------- */
aside, [data-slot="sidebar"] { color: #ffffff !important; }
aside a, aside span, aside button, aside div,
[data-slot="sidebar"] a, [data-slot="sidebar"] span, [data-slot="sidebar"] button { color: inherit; }
.text-sidebar-foreground, .text-sidebar-accent-foreground { color: #ffffff !important; }
aside .text-gray-400, [data-slot="sidebar"] .text-gray-400 { color: #dff4ff !important; }

/* ---------- 头部 / 弹层 / 菜单 ---------- */
header { color: #f6fdff !important; }
[role="menu"], [data-slot="dropdown-menu-content"], [data-slot="popover-content"],
[role="dialog"], [data-slot="dialog-content"] { color: #f6fdff !important; }
[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"] { color: #f0f5f9 !important; }

/* ---------- 徽章 / 标签：底色深，文字必须亮 ---------- */
[class*="bg-blue-500/"], [class*="bg-sky-500/"], [class*="bg-cyan-500/"],
[class*="bg-teal-500/"], [class*="bg-emerald-500/"], [class*="bg-green-500/"],
[class*="bg-lime-500/"], [class*="bg-yellow-500/"], [class*="bg-amber-500/"],
[class*="bg-orange-500/"], [class*="bg-red-500/"], [class*="bg-rose-500/"],
[class*="bg-pink-500/"], [class*="bg-fuchsia-500/"], [class*="bg-purple-500/"],
[class*="bg-violet-500/"], [class*="bg-indigo-500/"],
[class*="bg-gray-500/"], [class*="bg-zinc-500/"], [class*="bg-slate-500/"] {
  color: #ffffff !important;
}

/* ---------- 彩色强调文字：再提一档亮度 ---------- */
.text-blue-400, .text-blue-500 { color: #93c0ff !important; }
.text-sky-400, .text-sky-500 { color: #86d5f7 !important; }
.text-cyan-400, .text-cyan-500 { color: #7fe4e8 !important; }
.text-teal-400, .text-teal-500 { color: #6ee6c9 !important; }
.text-emerald-400, .text-emerald-500 { color: #6ee6ad !important; }
.text-green-400, .text-green-500 { color: #7fe895 !important; }
.text-lime-400, .text-lime-500 { color: #c2e878 !important; }
.text-yellow-400, .text-yellow-500 { color: #f2d66e !important; }
.text-amber-400, .text-amber-500 { color: #f9ce83 !important; }
.text-orange-400, .text-orange-500 { color: #fbb387 !important; }
.text-red-400, .text-red-500 { color: #faa4a4 !important; }
.text-rose-400, .text-rose-500 { color: #fba5bb !important; }
.text-pink-400, .text-pink-500 { color: #f9aed0 !important; }
.text-fuchsia-400, .text-fuchsia-500 { color: #edb8fa !important; }
.text-purple-400, .text-purple-500 { color: #d3bcfa !important; }
.text-violet-400, .text-violet-500 { color: #c0bcf9 !important; }
.text-indigo-400, .text-indigo-500 { color: #b4bcfb !important; }

/* ---------- 链接 ---------- */


/* ---------- 代码块 ---------- */
pre, code { color: #f0f5f9 !important; }

/* ---------- 登录页 ---------- */
.login-split p, .login-split span { color: #d8eefc !important; }
.login-split label { color: #ecf1f5 !important; }
.login-split input::placeholder { color: #aeb7bf !important; }

/* ---------- 提示条 ---------- */
[data-sonner-toaster] { --normal-text: #f6fdff !important; --normal-description: #dff4ff !important; }

/* ===== v5：停用白色主题后的版面补齐（2026-10-31）=====
   白色主题那份样式整份都是 !important 且优先级更高，会把深灰主题的文字压成深色。
   这里把它提供的版面/尺寸规则搬过来（配色改成深灰），白色主题不再加载。
   回滚：恢复 index.html 里 light-theme.css 那一行，并删掉本段。 */

/* ---- 登录页：居中卡片、隐藏左侧大图、尺寸与间距 ---- */
.login-split {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
  max-width: none !important;
  padding: 24px !important;
  grid-template-columns: none !important;
}
.login-split > div:first-child { display: none !important; }
.login-split > div:nth-child(2) {
  max-width: 420px !important;
  padding: 36px 32px !important;
  border-radius: 16px !important;
}
.login-split > div:nth-child(2) > div { width: 100% !important; max-width: none !important; }
.login-split form { width: 100% !important; }
.login-split form > * + * { margin-top: 16px !important; }

.login-split input {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 44px !important;
  padding: 0 12px !important;
  border: 1px solid #17304a !important;
  border-radius: 10px !important;
  background: #071220 !important;
  color: #ffffff !important;
  font-size: 14px !important;
}
.login-split input:focus {
  border-color: #8b939b !important;
  box-shadow: 0 0 0 3px rgba(200,210,220,.14) !important;
  outline: none !important;
}
.login-split input[type="checkbox"] {
  width: 16px !important; height: 16px !important;
  padding: 0 !important; border-radius: 4px !important;
  accent-color: #cbd3da !important;
}
.login-split input::placeholder { color: #b3bcc4 !important; }

.login-split h1 { font-size: 22px !important; font-weight: 600 !important; letter-spacing: -.01em !important; color: #ffffff !important; }
.login-split p { font-size: 13px !important; color: #dff4ff !important; }
.login-split label { font-size: 13px !important; font-weight: 500 !important; color: #eef3f7 !important; }
.login-split span { color: #dff4ff !important; }
.login-split a { color: #9dc7ff !important; }

.login-split button[type="submit"] {
  height: 44px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  border-radius: 10px !important;
  border: 1px solid #20425e !important;
  background: #3b4148 !important;
  color: #ffffff !important;
}
.login-split button[type="submit"]:hover:not(:disabled) { background: #183349 !important; border-color: #6a727a !important; }
.login-split button[type="submit"] svg { color: #ffffff !important; }
.login-split button[type="submit"]:disabled { opacity: .55 !important; cursor: not-allowed !important; }
.login-split button:not([type="submit"]) { color: #c8d1d9 !important; }
.login-split [class*="text-red-500"] { color: #ff9d9d !important; }

/* 登录页错误提示（由 login-ux.js 插入）*/
.login-error-box {
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239,68,68,.16);
  border: 1px solid #7a3b3b;
  color: #ffb8b8;
  font-size: 13px;
  line-height: 1.45;
  display: none;
}
.login-error-box.show { display: block; }

/* 侧边栏 logo 圆角 */
.bg-sidebar img[src*="eagle-logo"],
[data-slot="sidebar"] img[src*="eagle-logo"] {
  border-radius: 8px !important;
  object-fit: cover !important;
}

/* 分页控件尺寸 */
.RaPagination-root, .RaPagination-root * { box-shadow: none !important; }
.RaPagination-root button, .RaPagination-root .MuiButtonBase-root,
.MuiTablePagination-root button, .MuiTablePagination-root .MuiButtonBase-root {
  min-width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
}

/* ===== v6：深色/彩色实底按钮上的文字提纯（2026-10-31）=====
   红底白字这类实心按钮，文字用纯白，保证小字号也清晰。 */
[class*="bg-[#dc3545]"], [class*="bg-[#dc3546]"], [class*="bg-[#e14c5a]"],
[class*="bg-red-500"], [class*="bg-red-600"], [class*="bg-rose-500"], [class*="bg-rose-600"],
[class*="bg-blue-500"], [class*="bg-blue-600"], [class*="bg-emerald-500"], [class*="bg-emerald-600"],
[class*="bg-green-500"], [class*="bg-green-600"], [class*="bg-indigo-500"], [class*="bg-indigo-600"],
[class*="bg-purple-500"], [class*="bg-purple-600"], [class*="bg-violet-500"], [class*="bg-amber-500"],
[class*="bg-orange-500"], [class*="bg-orange-600"], [class*="bg-teal-500"], [class*="bg-cyan-500"],
[class*="bg-sky-500"], [class*="bg-pink-500"], [class*="bg-fuchsia-500"], [class*="bg-lime-600"] {
  color: #ffffff !important;
}
[class*="bg-[#dc3545]"] *, [class*="bg-red-500"] *, [class*="bg-red-600"] *,
[class*="bg-blue-600"] *, [class*="bg-emerald-600"] *, [class*="bg-green-600"] * {
  color: #ffffff !important;
}

/* ===== v9：手机界面预览框保持浅色屏幕（2026-10-31）=====
   这是模拟安卓系统的操作示意图，内部是深色文字+浅色界面，
   不能被整站的 .bg-white 深灰化，否则深字压深底看不清。 */
[class*="w-[340px]"][class*="h-[740px]"],
div[class*="w-[340px]"][class*="h-[740px]"] {
  background-color: #ffffff !important;
}
/* 预览框内的浅色小卡片保持原浅色 */
[class*="w-[340px]"][class*="h-[740px]"] [class*="bg-[#F9FAFB]"],
[class*="w-[340px]"][class*="h-[740px]"] [class*="bg-[#EFF6FF]"] {
  background-color: inherit !important;
}

/* ===== v10：手机预览框内部的白底卡片也保持白色（2026-10-31）===== */
[class*="w-[340px]"][class*="h-[740px]"] .bg-white,
[class*="w-[340px]"][class*="h-[740px]"] [class*="bg-white"] {
  background-color: #ffffff !important;
}
/* 框内浅色小卡片/提示条维持浅色，保证内部深色字可读 */
[class*="w-[340px]"][class*="h-[740px]"] [class*="bg-[#F9FAFB]"] { background-color: #f9fafb !important; }
[class*="w-[340px]"][class*="h-[740px]"] [class*="bg-[#EFF6FF]"] { background-color: #eff6ff !important; }

/* ===== v11：预览框按原设计区分深/浅界面（2026-10-31）=====
   浅色手机界面（bg-white）→ 白底深字；
   深色手机界面（bg-[#1A1A2E]）→ 保持深底白字。 */
[class*="w-[340px]"][class*="h-[740px]"][class*="bg-[#1A1A2E]"],
[class*="w-[340px]"][class*="h-[740px]"][class*="bg-[#1a1a2e]"] {
  background-color: #1a1a2e !important;
}
/* 浅色界面里的次要灰字恢复原灰阶（白底上才看得清）*/
[class*="w-[340px]"][class*="h-[740px]"][class*="bg-white"] [class*="text-[#7fa3bd]"] {
  color: #7fa3bd !important;
}
/* 预览框内的蓝色按钮加深一档，白字更清楚 */
[class*="w-[340px]"][class*="h-[740px]"] [class*="bg-[#4F8CFF]"],
[class*="w-[340px]"][class*="h-[740px]"] [class*="bg-[#4f8cff]"] {
  background-color: #2563eb !important;
}

/* ===== v12：预览框内联蓝色按钮加深，白字对比更足（2026-10-31）===== */
[class*="w-[340px]"][class*="h-[740px]"] [style*="rgb(79, 140, 255)"],
[class*="w-[340px]"][class*="h-[740px]"] [style*="rgb(79,140,255)"] {
  background-color: #2563eb !important;
}
/* ============================================================
   天狼科技 · 深蓝科技主题覆盖层（2026-11-08）
   品牌主色 #22d3ee 青蓝 / 底色 #050c18 / 卡片 #0a1626
   ============================================================ */
:root, :host {
  /* 品牌色：把原来的红/橙梯度整体切到青蓝梯度 */
  --color-red-50:  oklch(97.7% .013 203.53);
  --color-red-100: oklch(95.4% .044 203.388);
  --color-red-200: oklch(91.7% .08 205.041);
  --color-red-300: oklch(86.5% .127 207.078);
  --color-red-400: oklch(78.9% .154 211.53);
  --color-red-500: oklch(71.5% .143 215.221);
  --color-red-600: oklch(60.9% .126 221.723);
  --color-red-700: oklch(52% .105 223.128);
  --color-red-800: oklch(45% .085 224.283);
  --color-red-900: oklch(39.8% .07 227.392);
  --color-red-950: oklch(30.2% .056 229.695);

  --color-orange-50:  oklch(97.7% .013 236.62);
  --color-orange-100: oklch(95.1% .025 236.824);
  --color-orange-200: oklch(90.1% .058 230.902);
  --color-orange-300: oklch(82.8% .111 230.318);
  --color-orange-400: oklch(74.6% .16 232.661);
  --color-orange-500: oklch(68.5% .169 237.323);
  --color-orange-600: oklch(58.8% .158 241.966);
  --color-orange-700: oklch(50% .134 242.749);
  --color-orange-800: oklch(44.3% .11 240.79);
  --color-orange-900: oklch(39.1% .09 240.876);
  --color-orange-950: oklch(29.3% .066 243.157);

  /* 面板语义变量 */
  --background:#050c18; --foreground:#eaf9ff;
  --card:#0a1626; --card-foreground:#eaf9ff;
  --popover:#0b1a2c; --popover-foreground:#eaf9ff;
  --muted:#0e1d30; --muted-foreground:#9fc0d6;
  --accent:#102236; --accent-foreground:#eaf9ff;
  --border:#17304a; --input:#17304a;
  --secondary:#0e1d30; --secondary-foreground:#eaf9ff;
  --primary:#22d3ee; --primary-foreground:#04121c;
  --sidebar:210 60% 4%; --sidebar-background:210 60% 4%;
  --sidebar-foreground:198 60% 90%;
  --sidebar-accent:200 50% 12%;
  --sidebar-accent-foreground:190 90% 92%;
  --sidebar-border:#17304a;
}

html, body, #root { background-color:#050c18 !important; color:#eaf9ff !important; }

/* 品牌文字：青蓝渐变统一色调 */
[class*="from-red-500"][class*="to-orange-500"],
[class*="from-red-400"][class*="to-orange-400"] {
  background-image: linear-gradient(90deg,#22d3ee 0%,#3b82f6 100%) !important;
}
/* 主按钮：青蓝渐变 + 辉光 */
button[class*="from-red-500"], a[class*="from-red-500"], [role="button"][class*="from-red-500"] {
  background-image: linear-gradient(135deg,#22d3ee 0%,#0ea5e9 100%) !important;
  color:#04121c !important; font-weight:600;
  box-shadow:0 4px 18px -6px rgba(34,211,238,.55);
}
/* 顶栏 / 侧栏 描边青化 */
header, [class*="bg-[#0d1117]"].border-b { border-color:#17304a !important; }
/* 菜单选中态：青色半透明块 */
a[aria-current="page"], [data-state="active"][class*="bg-"], .active[class*="bg-"] {
  background-color: rgba(34,211,238,.14) !important;
  box-shadow: inset 0 0 0 1px rgba(34,211,238,.25);
}
/* 登录页左图背景：底部压深蓝，保证文字可读 */
.login-split > div[style*="login-bg"] { background-color:#040c16; }
.login-split > div[style*="login-bg"]::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(160deg, rgba(5,12,24,.62) 0%, rgba(5,12,24,.34) 45%, rgba(5,12,24,.85) 100%),
             radial-gradient(900px 520px at 18% 22%, rgba(34,211,238,.16), transparent 62%);
}
.login-split > div[style*="login-bg"] > * { position:relative; z-index:2; }
/* 登录表单侧：深蓝底 + 顶部青色细光 */
.login-split > div:last-child { background:#050c18 !important; }
/* 登录页图标：方形圆角（小尺寸也清晰） */
img[src*="eagle-logo"] { object-fit:cover; }
/* 卡片统一青色微光边 */
[class*="rounded-xl"][class*="border"][class*="bg-[#0a1626]"] { box-shadow:0 0 0 1px rgba(34,211,238,.05), 0 8px 30px -22px rgba(34,211,238,.6); }
/* 滚动条配色 */
::-webkit-scrollbar-thumb { background:#1b3a55 !important; }
::-webkit-scrollbar-track { background:#050c18 !important; }

/* ===== 登录页两栏版式恢复（桌面显示背景图，2026-11-08） ===== */
@media (min-width: 1024px) {
  .login-split {
    display: grid !important;
    grid-template-columns: 1.45fr 1fr !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    min-height: 100vh !important;
    background: #050c18 !important;
  }
  .login-split > div:first-child { display: flex !important; }
  .login-split > div:nth-child(2) {
    max-width: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #050c18 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .login-split > div:nth-child(2) > div { max-width: 380px !important; }
  .login-split > div:first-child::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(5,12,24,.70) 0%, rgba(5,12,24,.38) 40%, rgba(5,12,24,.90) 100%);
    z-index: 1; pointer-events: none;
  }
}
/* 品牌名渐变（覆盖纯色 !important 导致的渐变失效） */
.login-split span[class*="bg-clip-text"] {
  color: transparent !important;
  background-image: linear-gradient(90deg, #22d3ee 0%, #3b82f6 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
/* 登录按钮：青蓝渐变 + 辉光 */
.login-split button[type="submit"] {
  background: linear-gradient(135deg, #22d3ee 0%, #0ea5e9 100%) !important;
  color: #04121c !important;
  border: 1px solid rgba(34,211,238,.45) !important;
  box-shadow: 0 10px 26px -14px rgba(34,211,238,.85) !important;
  font-weight: 600 !important;
}
.login-split button[type="submit"]:hover:not(:disabled) { filter: brightness(1.07); }
.login-split button[type="submit"] svg { color: #04121c !important; }
.login-split input:focus {
  border-color: #22d3ee !important;
  box-shadow: 0 0 0 3px rgba(34,211,238,.18) !important;
}

/* ===== 登录页背景图完整显示（不裁字，2026-11-08） ===== */
@media (min-width: 1024px) {
  .login-split > div:first-child {
    background-image: url('/login-bg.jpg') !important;
    background-size: contain !important;
    background-position: center 46% !important;
    background-repeat: no-repeat !important;
    background-color: #050c18 !important;
  }
  .login-split > div:first-child::before {
    content: "" !important;
    position: absolute !important;
    inset: -40px !important;
    z-index: 0 !important;
    pointer-events: none !important;
    background-image: url('/login-bg.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    filter: blur(30px) brightness(.38) saturate(1.15) !important;
  }
  .login-split > div:first-child > * { position: relative; z-index: 3; }
}

/* ===== 登录页背景：主图完整呈现 + 深蓝底 + 青色光晕（最终版） ===== */
@media (min-width: 1024px) {
  .login-split > div:first-child {
    background:
      url('/login-bg.jpg') center 45% / contain no-repeat,
      radial-gradient(1100px 620px at 22% 24%, rgba(34,211,238,.13), transparent 62%),
      #050c18 !important;
  }
  .login-split > div:first-child::before,
  .login-split > div:first-child::after { content: none !important; }
}

/* ===== 登录页细节收尾：左图右缘渐隐 + 右栏科技光晕 ===== */
@media (min-width: 1024px) {
  .login-split > div:first-child::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
    background: linear-gradient(90deg, transparent 58%, rgba(5,12,24,.45) 84%, #050c18 100%) !important;
    filter: none !important;
    pointer-events: none !important;
  }
  .login-split > div:nth-child(2) {
    background:
      radial-gradient(900px 520px at 50% 28%, rgba(34,211,238,.07), transparent 66%),
      radial-gradient(700px 420px at 50% 92%, rgba(59,130,246,.06), transparent 70%),
      #050c18 !important;
  }
}

/* ===== 全局品牌收尾：渐变文字 / 旧红橙图标底 / 旧灰底按钮 ===== */
span[class*="bg-clip-text"][class*="text-transparent"] {
  color: transparent !important;
  background-image: linear-gradient(92deg, #22d3ee 0%, #3b82f6 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
[class*="bg-red-500/"]    { background-color: rgba(34,211,238,.18) !important; }
[class*="bg-orange-500/"] { background-color: rgba(56,189,248,.18) !important; }
[class*="border-red-500/"]  { border-color: rgba(34,211,238,.35) !important; }
[class*="border-orange-500/"] { border-color: rgba(56,189,248,.35) !important; }
[class*="bg-[#161b22]"] { background-color: #08131f !important; }
[class*="bg-[#21262d]"] { background-color: #08131f !important; }
[class*="bg-[#0d1117]"] { background-color: #050c18 !important; }
/* 主按钮统一青蓝（原红橙渐变按钮） */
button[class*="from-red-500"], a[class*="from-red-500"], [role="button"][class*="from-red-500"] {
  background-image: linear-gradient(135deg,#22d3ee 0%,#0ea5e9 100%) !important;
  color: #04121c !important; border-color: rgba(34,211,238,.45) !important; font-weight: 600;
}

/* ===== 手机端登录页补品牌图标（2026-11-08） ===== */
@media (max-width: 1023px) {
  .login-split h1::before {
    content: "" !important;
    display: block !important;
    width: 56px; height: 56px;
    margin: 0 auto 14px !important;
    background: url('/eagle-logo-v2.png?v=2') center/contain no-repeat !important;
    border-radius: 16px;
    box-shadow: 0 8px 22px -12px rgba(34,211,238,.9);
  }
}
