/* theme-light.css — 浅色主题覆盖层
 * 1) shadcn CSS 变量覆盖：:root 只定义了一套深色变量（--sidebar:#010409 等），
 *    html.light 下按 GitHub Light 配色重定义整套变量（侧边栏/卡片/弹窗/输入框全浅色）
 * 2) 业务页写死深色 hex 类（bg-[#0d1117] 等）批量映射
 * 仅 html.light 生效；html.dark 时本文件零命中，深色保持原样
 */
/* ---------- 1. shadcn 主题变量（浅色，GitHub Light 风格） ---------- */
html.light {
  --background: #ffffff;
  --foreground: #1f2328;
  --card: #ffffff;
  --card-foreground: #1f2328;
  --popover: #ffffff;
  --popover-foreground: #1f2328;
  --primary: #dc3545;
  --primary-foreground: #ffffff;
  --secondary: #eaeef2;
  --secondary-foreground: #1f2328;
  --muted: #eaeef2;
  --muted-foreground: #57606a;
  --accent: #eaeef2;
  --accent-foreground: #1f2328;
  --destructive: #cf222e;
  --destructive-foreground: #ffffff;
  --border: #d0d7de;
  --input: #d0d7de;
  --ring: #dc3545;
  --chart-1: #dc3545;
  --chart-2: #f0883e;
  --chart-3: #3fb950;
  --chart-4: #58a6ff;
  --chart-5: #bc8cff;
  --sidebar: #ffffff;
  --sidebar-foreground: #1f2328;
  --sidebar-primary: #dc3545;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #f3f4f6;
  --sidebar-accent-foreground: #1f2328;
  --sidebar-border: #d0d7de;
  --sidebar-ring: #dc3545;
  background-color: #f6f8fa;
}
html.light body { background-color: #f6f8fa; }
/* 滚动条（写死深色） */
html.light ::-webkit-scrollbar-track { background: #f6f8fa; }
html.light ::-webkit-scrollbar-thumb { background: #c9d1d9; }
html.light ::-webkit-scrollbar-thumb:hover { background: #8c959f; }
/* 侧边栏分组标题（写死 text-[#e6edf3]）已被下面文字规则覆盖 */

/* ---------- 2. 写死深色 hex 类映射 ---------- */
html.light .bg-\[\#0d1117\] { background-color: #f6f8fa !important; }
html.light .bg-\[\#161b22\] { background-color: #ffffff !important; }
html.light .bg-\[\#21262d\] { background-color: #f3f4f6 !important; }
html.light .bg-\[\#1c2128\] { background-color: #f6f8fa !important; }
html.light .bg-\[\#2d333b\] { background-color: #eaeef2 !important; }
html.light .bg-\[\#262c36\] { background-color: #eaeef2 !important; }
html.light .bg-\[\#1c1c1c\] { background-color: #eaeef2 !important; }
html.light .bg-\[\#30363d\] { background-color: #d0d7de !important; }
html.light .bg-\[\#1a1a2e\] { background-color: #eaeef2 !important; }
html.light .bg-\[\#1c2333\] { background-color: #eaeef2 !important; }

/* ---------- 边框 ---------- */
html.light .border-\[\#30363d\] { border-color: #d0d7de !important; }
html.light .border-\[\#21262d\] { border-color: #d8dee4 !important; }
html.light .border-\[\#8b949e\] { border-color: #d0d7de !important; }
html.light .border-\[\#484f58\] { border-color: #afb8c1 !important; }

/* ---------- 文字 ---------- */
html.light .text-\[\#e6edf3\] { color: #1f2328 !important; }
html.light .text-\[\#c9d1d9\] { color: #24292f !important; }
html.light .text-\[\#8b949e\] { color: #57606a !important; }
html.light .text-\[\#484f58\] { color: #6e7781 !important; }
html.light .text-\[\#6e7681\] { color: #6e7781 !important; }
/* 白字：浅底上不可见 → 深字；彩色功能按钮上的白字保留（例外） */
html.light .text-white { color: #1f2328 !important; }
html.light .bg-primary .text-white, html.light .bg-primary text-white { color: #ffffff !important; }
html.light .bg-\[\#238636\] .text-white, html.light .bg-\[\#2ea043\] .text-white,
html.light .bg-\[\#22c55e\] .text-white, html.light .bg-\[\#01875F\] .text-white,
html.light .bg-\[\#00e676\] .text-white, html.light .bg-\[\#ff1744\] .text-white,
html.light .bg-\[\#4285f4\] .text-white, html.light .bg-red-500 .text-white,
html.light .bg-green-500 .text-white, html.light .bg-blue-500 .text-white { color: #ffffff !important; }

/* ---------- hover 态 ---------- */
html.light .hover\:bg-\[\#30363d\]:hover { background-color: #d0d7de !important; }
html.light .hover\:bg-\[\#21262d\]:hover { background-color: #eaeef2 !important; }
html.light .hover\:bg-\[\#0d1117\]:hover { background-color: #eaeef2 !important; }
html.light .hover\:bg-\[\#1c2128\]:hover { background-color: #eaeef2 !important; }
html.light .hover\:bg-\[\#161b22\]:hover { background-color: #f3f4f6 !important; }
html.light .hover\:bg-\[\#1c2333\]:hover { background-color: #eaeef2 !important; }
html.light .hover\:border-\[\#8b949e\]:hover { border-color: #afb8c1 !important; }
html.light .hover\:border-\[\#484f58\]:hover { border-color: #8c959f !important; }
html.light .hover\:border-\[\#30363d\]:hover { border-color: #afb8c1 !important; }

/* ---------- 设备控制按钮区（lM 组件内联样式：bg #262c36/#1a1a1a/#1a2e1a，border #3a4250，文字 #c9d1d9） ----------
   内联样式优先于类规则，需 !important 覆盖；属性选择器兼容 Chrome(rgb()) 与 Firefox(hex) 两种序列化 */
html.light button[style*="rgb(38, 44, 54)"],
html.light button[style*="#262c36"] { background-color: #ffffff !important; border-color: #d0d7de !important; color: #24292f !important; }
html.light button[style*="rgb(38, 44, 54)"]:hover,
html.light button[style*="#262c36"]:hover { background-color: #f3f4f6 !important; }
/* 红色态（关闭投屏/危险操作）：深底浅字变浅底深红 */
html.light button[style*="rgb(248, 113, 113)"],
html.light button[style*="#f87171"] { color: #cf222e !important; }
/* 绿色态（成功/已开启） */
html.light button[style*="rgb(74, 222, 128)"],
html.light button[style*="#4ade80"] { color: #1a7f37 !important; }
html.light button[style*="rgb(26, 46, 26)"],
html.light button[style*="#1a2e1a"] { background-color: #f0fdf4 !important; }
/* 禁用/深色态（ADB未连接等，#1a1a1a 底） */
html.light button[style*="rgb(26, 26, 26)"],
html.light button[style*="#1a1a1a"] { background-color: #eaeef2 !important; border-color: #d8dee4 !important; color: #6e7781 !important; }
html.light button[style*="rgb(72, 79, 88)"],
html.light button[style*="#484f58"] { color: #57606a !important; }

/* 品牌色/功能色（绿/红/蓝/橙）在浅色下仍协调，保留不覆盖 */
