/* ============================================================================
 * 鱼控安卓远程系统 · 主题层（brand.css）
 * ----------------------------------------------------------------------------
 * 只做视觉覆盖，不改任何业务逻辑：
 *   1. 重定义 shadcn 设计令牌（--background/--primary/--accent…）→ 深空蓝 + 电光青
 *   2. 覆盖侧边栏令牌（--sidebar-*）
 *   3. 覆盖原橙色渐变文字（from-red-500 to-orange-500 → 蓝青）
 *   4. 登录页左侧背景换成 yk-login-bg.png，右侧表单卡片重排
 *   5. 统一圆角/阴影/滚动条/选中色
 * ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --radius: .5rem;

  --background: #070c18;
  --foreground: #e9eefb;
  --card: #0e1526;
  --card-foreground: #e9eefb;
  --popover: #0e1526;
  --popover-foreground: #e9eefb;

  --primary: #2f6bff;
  --primary-foreground: #ffffff;
  --secondary: #151f36;
  --secondary-foreground: #dbe4f7;
  --muted: #131c30;
  --muted-foreground: #7f8dab;
  --accent: #00d1c1;
  --accent-foreground: #04211e;
  --destructive: #ff4d5e;

  --border: #1b2740;
  --input: #1b2740;
  --ring: #2f6bff;

  --chart-1: #2f6bff;
  --chart-2: #00d1c1;
  --chart-3: #6d8cff;
  --chart-4: #ffb020;
  --chart-5: #b06bff;

  --sidebar: #050912;
  --sidebar-background: 222 47% 4%;
  --sidebar-foreground: 218 32% 92%;
  --sidebar-primary: 222 100% 59%;
  --sidebar-primary-foreground: 0 0% 100%;
  --sidebar-accent: 222 40% 12%;
  --sidebar-accent-foreground: 218 32% 92%;
  --sidebar-border: 222 40% 14%;
  --sidebar-ring: 222 100% 59%;
}

/* ---------- 2. 全局质感 ---------- */
html, body {
  background-color: #070c18 !important;
  font-family: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif !important;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

/* 顶部渐变条：一眼区别旧版 */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 9999;
  background: linear-gradient(90deg, #2f6bff 0%, #00d1c1 45%, #6d8cff 100%);
  pointer-events: none;
}

::selection { background: rgba(47, 107, 255, .38); color: #fff; }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #070c18; }
*::-webkit-scrollbar-thumb {
  background: #1e2b47;
  border-radius: 8px;
  border: 2px solid #070c18;
}
*::-webkit-scrollbar-thumb:hover { background: #2c3d61; }

/* ---------- 3. 覆盖原品牌渐变（红→橙 改成 蓝→青） ---------- */
.bg-gradient-to-r.from-red-500,
.bg-gradient-to-r.from-red-500.to-orange-500,
[class*="from-red-500"][class*="bg-clip-text"] {
  background-image: linear-gradient(92deg, #4f8bff 0%, #2f6bff 38%, #00d1c1 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* 红色主按钮/高亮统一成品牌蓝 */
.bg-red-500, .bg-red-600, .hover\:bg-red-600:hover, .hover\:bg-red-500:hover {
  background-color: #2f6bff !important;
}
.text-red-500, .text-red-600, .text-red-400 { color: #5b8bff !important; }
.border-red-500, .border-red-600 { border-color: #2f6bff !important; }
.bg-red-500\/10, .bg-red-500\/15, .bg-red-500\/20 { background-color: rgba(47, 107, 255, .14) !important; }

/* 橙色强调换青色（状态点、徽标、进度） */
.text-orange-500, .text-orange-400 { color: #00d1c1 !important; }
.bg-orange-500 { background-color: #00d1c1 !important; }

/* ---------- 4. 登录页 ---------- */
.login-split > div:first-child {
  background-image:
    linear-gradient(180deg, rgba(7, 12, 24, .18) 0%, rgba(7, 12, 24, .82) 100%),
    url("/yk-login-bg.png") !important;
  background-size: cover !important;
  background-position: center !important;
}

.min-h-screen.flex.bg-\[\#0d1117\] {
  background: radial-gradient(1200px 700px at 82% 8%, rgba(47, 107, 255, .14), transparent 60%),
              radial-gradient(900px 600px at 8% 92%, rgba(0, 209, 193, .10), transparent 60%),
              #070c18 !important;
}

/* 右侧表单区：给卡片加边与光晕 */
.login-split > div:last-child {
  background:
    linear-gradient(180deg, rgba(14, 21, 38, .55), rgba(7, 12, 24, .92));
  border-left: 1px solid rgba(47, 107, 255, .14);
  box-shadow: inset 40px 0 90px -60px rgba(47, 107, 255, .45);
}

/* 登录卡片本体 */
.login-split form,
.login-split [class*="card"] {
  background: rgba(14, 21, 38, .86) !important;
  border: 1px solid rgba(47, 107, 255, .22) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 70px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 209, 193, .06) inset !important;
  backdrop-filter: blur(10px);
}

/* 登录页左上品牌区：logo 放大 + 加副标题氛围 */
.login-split img[src*="yk-logo"] {
  height: 40px !important;
  width: 40px !important;
  border-radius: 11px !important;
  box-shadow: 0 6px 22px -6px rgba(47, 107, 255, .85);
}

/* 登录页底部小字 */
.login-split p,
.login-split .text-sm {
  color: #8c9ab8;
}

/* ---------- 5. 侧边栏 ---------- */
[data-slot="sidebar"],
[data-sidebar="sidebar"],
aside {
  background: linear-gradient(180deg, #060b16 0%, #04080f 100%) !important;
  border-right: 1px solid #131d31 !important;
}

[data-slot="sidebar"] img[src*="yk-logo"],
[data-sidebar="sidebar"] img[src*="yk-logo"] {
  border-radius: 7px !important;
  box-shadow: 0 3px 12px -4px rgba(47, 107, 255, .9);
}

/* 侧边栏激活项：左侧青光条 */
[data-active="true"], [aria-current="page"] {
  background: linear-gradient(90deg, rgba(47, 107, 255, .20), rgba(0, 209, 193, .06)) !important;
  border-left: 2px solid #00d1c1 !important;
  color: #ffffff !important;
}

/* ---------- 6. 卡片 / 表格 / 按钮 ---------- */
.rounded-xl, .rounded-2xl, .rounded-lg { border-color: #1b2740; }

[class*="bg-card"], [class*="bg-[#161b22]"] {
  background-color: #0e1526 !important;
}

table thead tr {
  background: #0b1220 !important;
  color: #8fa0c0 !important;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .08em;
}

table tbody tr:hover { background: rgba(47, 107, 255, .07) !important; }

button[class*="bg-primary"], .btn-primary {
  background-image: linear-gradient(92deg, #2f6bff, #4f8bff) !important;
  box-shadow: 0 8px 24px -12px rgba(47, 107, 255, .95);
}

input, textarea, select {
  background-color: #0b1220 !important;
  border-color: #1b2740 !important;
  color: #e9eefb !important;
}
input:focus, textarea:focus, select:focus {
  border-color: #2f6bff !important;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .18) !important;
  outline: none !important;
}

/* 设备在线状态点：绿→青 */
.bg-green-500, .bg-emerald-500 { background-color: #00d1c1 !important; }

/* 顶栏 */
header, [data-slot="header"] {
  background: rgba(7, 12, 24, .82) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #131d31 !important;
}

/* 弹窗/抽屉 */
[role="dialog"], [data-slot="dialog-content"] {
  background: #0e1526 !important;
  border: 1px solid #1b2740 !important;
  box-shadow: 0 30px 80px -30px #000 !important;
}

/* 骨架/加载条换品牌色 */
.sonner-loading-bar, [class*="loading"] { background-color: #2f6bff !important; }

/* ---------- 7. 侧边栏品牌名完整显示（8 字标题在窄栏里不截断） ---------- */
[data-slot="sidebar-menu-button"] span,
[data-sidebar="sidebar"] a span.text-base,
aside a span.text-base {
  font-size: 12.5px !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  max-width: none !important;
}
[data-slot="sidebar"] img[src*="yk-logo"],
[data-sidebar="sidebar"] img[src*="yk-logo"],
aside img[src*="yk-logo"] {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 auto;
}

