/* KK 登录页外观。表单、记住密码、两步验证仍走原来的组件。 */
.login-split {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100svh;
  height: 100svh;
  display: block !important;
  position: relative;
  z-index: 30;
  overflow: hidden;
  background: transparent !important;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
.min-h-screen:has(.login-split) {
  background: transparent !important;
}
.kk-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
}
.kk-bg-video.kk-on { opacity: 1; }
.login-split::after { content: none; }
.login-split > div:first-of-type {
  display: none !important;
}
html:has(.login-split) #kk-boot video { object-position: center center; }
.login-split > div:last-child {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: var(--kk-panel-w, 420px);
  height: 100%;
  background: rgba(8, 8, 10, .46) !important;
  background-color: rgba(8, 8, 10, .46) !important;
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  border-left: 1px solid rgba(243, 230, 196, .2);
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 48px 40px !important;
  box-sizing: border-box;
}
.login-split [class*="sm:w-[380px]"] {
  position: relative;
  width: 100% !important;
  max-width: 340px !important;
  margin: 0 !important;
  box-sizing: border-box;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.login-split [class*="sm:w-[380px]"]::before { content: none; }
.kk-brand {
  position: fixed;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}
.kk-brand[hidden] { display: none !important; }
.kk-brand img {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(243, 230, 196, .5), 0 10px 28px rgba(0, 0, 0, .35);
}
.kk-brand span {
  color: #f7f1e6;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1;
  margin-right: -0.22em;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(243, 230, 196, .5);
}
.login-split input:not([type="checkbox"]) {
  height: 48px !important;
  border: 1px solid rgba(243, 230, 196, .28) !important;
  border-radius: 12px !important;
  background: rgba(0, 0, 0, .38) !important;
  color: #f7f1e6 !important;
  padding: 0 15px !important;
  font-size: 15px !important;
  box-shadow: none !important;
}
.login-split input:not([type="checkbox"]):focus {
  border-color: #f3e6c4 !important;
  box-shadow: 0 0 0 3px rgba(243, 230, 196, .16) !important;
  outline: none !important;
}
.login-split input::placeholder {
  color: #b7ab98;
}
.login-split label {
  color: #f0e6d4 !important;
  font-size: 13px !important;
}
.login-split button[type="submit"] {
  height: 48px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #f8f3e8, #d8c4a0) !important;
  color: #1c1610 !important;
  letter-spacing: 6px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28) !important;
}
.login-split button[type="submit"]:hover {
  filter: brightness(1.06);
}
.login-split button[type="submit"] svg { display: none !important; }
.login-split input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: none;
  accent-color: #e7d3a8;
  border-radius: 4px !important;
}
.login-split label:has(input[type="checkbox"]) {
  align-items: center;
  gap: 8px;
  min-height: 0;
  line-height: 1;
}

.login-split.kk-login-main .text-center {
  text-align: left !important;
}
.login-split.kk-login-main h1 {
  font-size: 30px !important;
  font-weight: 600;
  letter-spacing: 2px;
  margin: 0 0 10px;
}
.login-split.kk-login-main h1 {
  color: #f7f1e6 !important;
}
.login-split.kk-login-main h1 + p {
  color: #d9d0c2 !important;
  font-size: 14px !important;
  margin: 0 0 32px !important;
}
.login-split.kk-login-main form {
  display: flex;
  flex-direction: column;
}
.login-split.kk-login-main form > div:nth-child(2) {
  position: relative;
}
.login-split.kk-login-main form > div:nth-child(2) button {
  position: absolute;
  right: 4px;
  bottom: 6px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: #e7d3a8;
  font-size: 13px;
  z-index: 4;
}
.login-split.kk-login-main form > div:nth-child(2) button svg {
  display: none;
}
.login-split.kk-login-main form > div:has(input.input-masked) button::after {
  content: "显示";
}
.login-split.kk-login-main form > div:not(:has(input.input-masked)) button::after {
  content: "隐藏";
}
.login-split.kk-login-main form > div:nth-child(2) input {
  padding-right: 65px !important;
}
.login-split.kk-login-main button[type="submit"] svg {
  display: none;
}
.login-split.kk-login-main form::after {
  content: "罪天使 · 管理平台";
  display: block;
  font-size: 12px;
  color: #cbbfaa;
  text-align: center;
  margin-top: 22px;
  line-height: 1.8;
}
.login-split.kk-login-main > div:last-child::after {
  content: none;
}

@media (max-width: 1023px) {
  .kk-bg-video,
  html:has(.login-split) #kk-boot video { object-position: center 16%; }
  .login-split > div:last-child {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    border-left: 0;
    border-top: 1px solid rgba(243, 230, 196, .2);
    border-radius: 22px 22px 0 0;
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
    padding: 22px 20px calc(18px + env(safe-area-inset-bottom)) !important;
  }
  .kk-brand {
    gap: 12px;
  }
  .kk-brand img { width: 52px; height: 52px; border-radius: 14px; }
  .kk-brand span { font-size: 24px; letter-spacing: 0.16em; margin-right: -0.16em; }
  .login-split [class*="sm:w-[380px]"] {
    max-width: none !important;
  }
  .login-split .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 14px !important; }
  .login-split form.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 12px !important; }
  .login-split.kk-login-main h1 {
    font-size: 24px !important;
    letter-spacing: 1px;
    margin-bottom: 0;
  }
  .login-split.kk-login-main h1 + p { margin: 0 0 18px !important; font-size: 13px !important; }
  .login-split input:not([type="checkbox"]) {
    height: 46px !important;
    font-size: 16px !important;
  }
  .login-split label { font-size: 12px !important; }
  .login-split button[type="submit"] {
    height: 46px !important;
    letter-spacing: 0.35em;
  }
  .login-split.kk-login-main form::after { margin-top: 14px; }
}

/* 登录后的页面：同一段天使视频铺底，面板做成半透明，危险和状态红保留。 */
html:not(:has(.login-split)) {
  --background: #07111e;
  --foreground: #eef5ff;
  --card: rgba(14, 12, 10, .72);
  --card-foreground: #eef5ff;
  --popover: #122033;
  --popover-foreground: #eef5ff;
  --primary: #e7d3a8;
  --primary-foreground: #1c1610;
  --secondary: #1a1612;
  --secondary-foreground: #f7f1e6;
  --muted: #16130f;
  --muted-foreground: #b7ab98;
  --accent: rgba(231, 211, 168, .16);
  --accent-foreground: #f7f1e6;
  --border: rgba(243, 230, 196, .28);
  --input: rgba(243, 230, 196, .28);
  --ring: #e7d3a8;
  --sidebar: rgba(8, 8, 10, .55);
  --sidebar-foreground: #f7f1e6;
  --sidebar-primary: #e7d3a8;
  --sidebar-primary-foreground: #1c1610;
  --sidebar-accent: rgba(231, 211, 168, .16);
  --sidebar-accent-foreground: #f3e6c4;
  --sidebar-border: rgba(243, 230, 196, .28);
  --sidebar-ring: #e7d3a8;
  --sidebar-background: 216 68% 6%;
  --chart-1: #38a8ff;
  --chart-2: #1aabe8;
}
html:not(:has(.login-split)) body {
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: transparent;
}
html:not(:has(.login-split)) #root,
html:not(:has(.login-split)) [data-slot="sidebar-wrapper"] {
  background: transparent !important;
}
html:not(:has(.login-split)) .bg-\[\#0d1117\],
html:not(:has(.login-split)) .bg-\[\#0d1117\]\/80,
html:not(:has(.login-split)) .bg-\[\#0d1117\]\/50 {
  background-color: rgba(7, 10, 16, .46) !important;
}
html:not(:has(.login-split)) .bg-\[\#161b22\] {
  background-color: rgba(14, 12, 10, .62) !important;
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
}
html:not(:has(.login-split)) .hover\:bg-\[\#161b22\]:hover,
html:not(:has(.login-split)) .hover\:bg-\[\#1c2333\]:hover {
  background-color: rgba(24, 20, 16, .74) !important;
}
html:not(:has(.login-split)) .bg-\[\#1c2128\],
html:not(:has(.login-split)) .bg-\[\#21262d\] {
  background-color: rgba(16, 14, 12, .72) !important;
}
html:not(:has(.login-split)) [data-slot="sidebar-inner"] {
  background-color: rgba(8, 8, 10, .5) !important;
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(243, 230, 196, .22) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .1);
}
html:not(:has(.login-split)) main {
  padding-top: 22px;
}
html:not(:has(.login-split)) main > header {
  background: rgba(8, 8, 10, .4);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-top: 1px solid rgba(243, 230, 196, .14);
  border-bottom: 1px solid rgba(243, 230, 196, .16);
}
html:not(:has(.login-split)) [data-slot="sidebar-header"] {
  padding: 2px 8px 0 !important;
}
html:not(:has(.login-split)) input.bg-\[\#0d1117\],
html:not(:has(.login-split)) textarea.bg-\[\#0d1117\],
html:not(:has(.login-split)) select.bg-\[\#0d1117\] {
  background-color: rgba(8, 8, 10, .78) !important;
}
html:not(:has(.login-split)) [data-slot="dialog-content"],
html:not(:has(.login-split)) [data-slot="sheet-content"],
html:not(:has(.login-split)) [data-slot="drawer-content"],
html:not(:has(.login-split)) [data-slot="popover-content"],
html:not(:has(.login-split)) [data-slot="dropdown-menu-content"] {
  background-color: rgba(10, 10, 12, .94) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
html:not(:has(.login-split)) .border-\[\#30363d\],
html:not(:has(.login-split)) .\!border-\[\#30363d\] {
  border-color: #26364f !important;
}
html:not(:has(.login-split)) .border-\[\#21262d\],
html:not(:has(.login-split)) .divide-\[\#21262d\] > :not(:last-child) {
  border-color: #1c3048 !important;
}
button[data-sidebar="menu-button"][data-zts-brand] {
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 12px !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
button[data-sidebar="menu-button"][data-zts-brand]:hover,
button[data-sidebar="menu-button"][data-zts-brand]:focus,
button[data-sidebar="menu-button"][data-zts-brand]:focus-visible {
  background: transparent !important;
  border: 0 !important;
  color: #f7f1e6 !important;
}
button[data-sidebar="menu-button"][data-zts-brand] img {
  width: auto !important;
  height: 44px !important;
  max-width: 96px !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 8px rgba(231, 211, 168, .35));
}
button[data-sidebar="menu-button"][data-zts-brand] span {
  display: inline-block;
  background-image: linear-gradient(180deg, #fff8ea 8%, #f3e6c4 46%, #d7b57a 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "STSong", "SimSun", serif !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  letter-spacing: 0.28em !important;
  line-height: 1 !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
html:not(:has(.login-split)) .peer\/menu-button[data-active="true"],
html:not(:has(.login-split)) [data-sidebar="menu-button"][data-active="true"],
html:not(:has(.login-split)) [data-active="true"] {
  color: #f3e6c4 !important;
  background-color: rgba(231, 211, 168, .16) !important;
  border-color: rgba(243, 230, 196, .45) !important;
}
html:not(:has(.login-split)) .from-red-500 { --tw-gradient-from: #f8f3e8 !important; }
html:not(:has(.login-split)) .to-orange-500 { --tw-gradient-to: #d8c4a0 !important; }
html:not(:has(.login-split)) .from-red-400 { --tw-gradient-from: #f7f1e6 !important; }
html:not(:has(.login-split)) .to-orange-400 { --tw-gradient-to: #e7d3a8 !important; }
html:not(:has(.login-split)) .focus\:border-red-500:focus {
  border-color: #e7d3a8 !important;
}
html:not(:has(.login-split)) :is(
  .bg-blue-500,
  .bg-blue-600,
  .bg-cyan-600,
  .bg-sky-400,
  .bg-sky-500,
  .hover\:bg-blue-500:hover,
  .hover\:bg-blue-700:hover,
  .hover\:bg-cyan-700:hover
) {
  background-color: #e7d3a8 !important;
  color: #1c1610 !important;
}
html:not(:has(.login-split)) :is(
  .bg-blue-500\/5,
  .bg-blue-500\/10,
  .bg-blue-500\/15,
  .bg-blue-500\/20,
  .bg-blue-600\/10,
  .bg-blue-600\/20,
  .bg-cyan-400,
  .bg-cyan-500\/5,
  .bg-cyan-500\/10,
  .bg-cyan-500\/15,
  .bg-sky-500\/20,
  .hover\:bg-blue-500\/10:hover,
  .hover\:bg-blue-500\/15:hover,
  .hover\:bg-blue-500\/20:hover,
  .hover\:bg-blue-600\/20:hover,
  .hover\:bg-cyan-500\/15:hover,
  .hover\:bg-cyan-500\/20:hover
) {
  background-color: rgba(231, 211, 168, .16) !important;
}
html:not(:has(.login-split)) :is(
  .text-blue-300,
  .text-blue-400,
  .text-blue-500,
  .text-cyan-300,
  .text-cyan-400,
  .text-sky-400,
  .text-\[\#58a6ff\],
  .hover\:text-blue-300:hover,
  .hover\:text-blue-400:hover,
  .hover\:text-cyan-400:hover
) {
  color: #f3e6c4 !important;
}
html:not(:has(.login-split)) :is(
  .border-blue-500,
  .border-blue-500\/5,
  .border-blue-500\/20,
  .border-blue-500\/30,
  .border-blue-500\/40,
  .border-blue-600\/30,
  .border-cyan-500\/5,
  .border-cyan-500\/20,
  .border-cyan-500\/30,
  .border-sky-500\/5,
  .border-\[\#58a6ff\],
  .hover\:border-blue-500\/40:hover,
  .hover\:border-cyan-500\/40:hover,
  .focus\:border-blue-500:focus,
  .focus\:border-cyan-500:focus,
  .focus\:border-cyan-500\/5:focus
) {
  border-color: rgba(243, 230, 196, .5) !important;
}
html:not(:has(.login-split)) :is(
  .ring-blue-500\/30,
  .ring-cyan-500\/30,
  .focus\:ring-blue-500\/20:focus
) {
  --tw-ring-color: rgba(231, 211, 168, .45) !important;
}
html:not(:has(.login-split)) button:is(.bg-red-500\/10, .bg-purple-500\/10, .bg-purple-500\/20, .hover\:bg-purple-500\/20:hover) {
  background-color: rgba(231, 211, 168, .18) !important;
  color: #f3e6c4 !important;
  border-color: rgba(243, 230, 196, .5) !important;
  --tw-ring-color: rgba(231, 211, 168, .45) !important;
}
html:not(:has(.login-split)) button:is(.bg-red-500\/10, .bg-purple-500\/10, .bg-purple-500\/20) :is(.text-red-300, .text-red-400, .text-purple-400) {
  color: #f3e6c4 !important;
}
html:not(:has(.login-split)) ::-webkit-scrollbar-track { background: #07111e; }
html:not(:has(.login-split)) ::-webkit-scrollbar-thumb { background: #26364f; }
html:not(:has(.login-split)) ::-webkit-scrollbar-thumb:hover { background: #3a5270; }

/* ===== 黑白主题切换（与其它站一致；默认外观仍为现有深蓝） ===== */

html[data-kk-theme="white"] {
  --background: #f4f7fb;
  --foreground: #1a2332;
  --card: #ffffff;
  --card-foreground: #1a2332;
  --popover: #ffffff;
  --popover-foreground: #1a2332;
  --primary: #1677d2;
  --primary-foreground: #ffffff;
  --secondary: #eef2f7;
  --secondary-foreground: #1a2332;
  --muted: #eef2f7;
  --muted-foreground: #5c6b80;
  --accent: #e7eef8;
  --accent-foreground: #1a2332;
  --border: #d5deea;
  --input: #d5deea;
  --ring: #1677d2;
  --sidebar: #ffffff;
  --sidebar-foreground: #1a2332;
  --sidebar-primary: #1677d2;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #e7eef8;
  --sidebar-accent-foreground: #1a2332;
  --sidebar-border: #e1e7f0;
  --sidebar-ring: #1677d2;
  --sidebar-background: 216 33% 98%;
  color-scheme: light;
}
html[data-kk-theme="white"] body { background: #f4f7fb; color: #1a2332; }
html[data-kk-theme="white"] .bg-\[\#0d1117\],
html[data-kk-theme="white"] .bg-\[\#0d1117\]\/80,
html[data-kk-theme="white"] .bg-\[\#0d1117\]\/50,
html[data-kk-theme="white"] .hover\:bg-\[\#0d1117\]:hover,
html[data-kk-theme="white"] .focus\:bg-\[\#0d1117\]:focus { background-color: #f4f7fb !important; }
html[data-kk-theme="white"] .bg-\[\#161b22\],
html[data-kk-theme="white"] .hover\:bg-\[\#161b22\]:hover { background-color: #ffffff !important; }
html[data-kk-theme="white"] .bg-\[\#1c2128\],
html[data-kk-theme="white"] .bg-\[\#21262d\],
html[data-kk-theme="white"] .bg-\[\#21262d\]\/50,
html[data-kk-theme="white"] .bg-\[\#262c36\],
html[data-kk-theme="white"] .bg-\[\#2d333b\],
html[data-kk-theme="white"] .bg-\[\#1c2333\],
html[data-kk-theme="white"] .hover\:bg-\[\#1c2128\]:hover,
html[data-kk-theme="white"] .hover\:bg-\[\#21262d\]:hover,
html[data-kk-theme="white"] .hover\:bg-\[\#1c2333\]:hover,
html[data-kk-theme="white"] .focus\:bg-\[\#1c2128\]:focus { background-color: #eef2f7 !important; }
html[data-kk-theme="white"] .bg-\[\#30363d\],
html[data-kk-theme="white"] .bg-\[\#30363d\]\/50,
html[data-kk-theme="white"] .hover\:bg-\[\#30363d\]:hover { background-color: #e4ebf3 !important; }
html[data-kk-theme="white"] .border-\[\#30363d\],
html[data-kk-theme="white"] .\!border-\[\#30363d\],
html[data-kk-theme="white"] .border-\[\#30363d\]\/50,
html[data-kk-theme="white"] .border-\[\#30363d\]\/30,
html[data-kk-theme="white"] .border-\[\#21262d\],
html[data-kk-theme="white"] .border-\[\#484f58\],
html[data-kk-theme="white"] .border-\[\#3a4250\],
html[data-kk-theme="white"] .hover\:border-\[\#30363d\]:hover,
html[data-kk-theme="white"] .hover\:border-\[\#484f58\]:hover,
html[data-kk-theme="white"] .divide-\[\#21262d\] > :not(:last-child) { border-color: #d5deea !important; }
html[data-kk-theme="white"] .text-\[\#e6edf3\],
html[data-kk-theme="white"] .hover\:text-\[\#e6edf3\]:hover { color: #1a2332 !important; }
html[data-kk-theme="white"] .text-\[\#c9d1d9\],
html[data-kk-theme="white"] .hover\:text-\[\#c9d1d9\]:hover { color: #243044 !important; }
html[data-kk-theme="white"] .text-\[\#8b949e\],
html[data-kk-theme="white"] .text-\[\#6e7681\],
html[data-kk-theme="white"] .text-\[\#9aa0a6\],
html[data-kk-theme="white"] .text-\[\#484f58\],
html[data-kk-theme="white"] .placeholder-\[\#8b949e\]::placeholder,
html[data-kk-theme="white"] .placeholder-\[\#484f58\]::placeholder { color: #5c6b80 !important; }
html[data-kk-theme="white"] .text-\[\#58a6ff\] { color: #1677d2 !important; }
html[data-kk-theme="white"] .peer\/menu-button[data-active="true"] {
  color: #1677d2 !important;
  background-color: #e7eef8 !important;
  border-color: #b9d4f5 !important;
}
html[data-kk-theme="white"] input,
html[data-kk-theme="white"] textarea,
html[data-kk-theme="white"] select {
  background-color: #ffffff;
  color: #1a2332;
  border-color: #d5deea;
}
html[data-kk-theme="white"] ::-webkit-scrollbar-track { background: #f4f7fb; }
html[data-kk-theme="white"] ::-webkit-scrollbar-thumb { background: #c5d0de; }
html[data-kk-theme="white"] ::-webkit-scrollbar-thumb:hover { background: #a8b6c9; }

html[data-kk-theme="white"] .min-h-screen:has(.login-split) { background: transparent !important; }
html[data-kk-theme="white"] .login-split { background-color: transparent; }
html[data-kk-theme="white"] .login-split > div:last-child {
  background: rgba(255, 252, 247, .9) !important;
  background-color: rgba(255, 252, 247, .9) !important;
  border-left-color: rgba(120, 96, 60, .22);
}
html[data-kk-theme="white"] .login-split [class*="sm:w-[380px]"] {
  background: transparent !important;
  border: 0;
  box-shadow: none;
}
html[data-kk-theme="white"] .login-split input {
  background: #ffffff !important;
  color: #1a2332 !important;
  border-color: #e4d8c4 !important;
}
html[data-kk-theme="white"] .login-split input::placeholder { color: #8aa0b8; }
html[data-kk-theme="white"] .login-split label,
html[data-kk-theme="white"] .login-split.kk-login-main h1 { color: #1a2332 !important; }
html[data-kk-theme="white"] .login-split.kk-login-main h1 + p,
html[data-kk-theme="white"] .login-split.kk-login-main form::after,
html[data-kk-theme="white"] .login-split.kk-login-main > div:last-child::after { color: #5c6b80 !important; }
html[data-kk-theme="white"] .kk-tg-login {
  background: #ffffff !important;
  color: #1a2332 !important;
  border-color: #d5deea !important;
}
@media (max-width: 1023px) {
  html[data-kk-theme="white"] .login-split > div:last-child {
    background: rgba(255, 252, 247, .92) !important;
    border-top-color: rgba(120, 96, 60, .22);
  }
}

#kk-theme-float,
.kk-theme-switch {
  display: none !important;
}
body:has(.login-split) #kk-theme-float {
  top: 18px;
  bottom: auto;
}
#kk-theme-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 4000;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(22, 119, 210, .28);
  background: #ffffff;
  color: #1677d2;
  box-shadow: 0 8px 22px rgba(16, 32, 56, .16);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#kk-theme-float svg { width: 20px; height: 20px; display: block; }
html[data-kk-theme="dark"] #kk-theme-float {
  background: #122033;
  color: #8fd4ff;
  border-color: #26364f;
}

/* 设备页操作按钮的颜色写在行内样式里，白色主题只换底色、边框和字色。 */
html[data-kk-theme="white"] button[style*="#262c36"],
html[data-kk-theme="white"] button[style*="38, 44, 54"] {
  background: #eef3f9 !important;
  border-color: #d3deea !important;
  color: #1a2332 !important;
}
html[data-kk-theme="white"] button[style*="#262c36"]:hover,
html[data-kk-theme="white"] button[style*="38, 44, 54"]:hover {
  background: #e3ebf5 !important;
}
html[data-kk-theme="white"] button[style*="#f87171"],
html[data-kk-theme="white"] button[style*="248, 113, 113"] {
  background: #fff1f1 !important;
  border-color: #f3c4c4 !important;
  color: #d1242f !important;
}
html[data-kk-theme="white"] button[style*="#4ade80"],
html[data-kk-theme="white"] button[style*="74, 222, 128"],
html[data-kk-theme="white"] button[style*="#1a2e1a"],
html[data-kk-theme="white"] button[style*="26, 46, 26"] {
  background: #eef8f1 !important;
  border-color: #b7e4c7 !important;
  color: #16803c !important;
}
html[data-kk-theme="white"] button[style*="#1a1a1a"],
html[data-kk-theme="white"] button[style*="26, 26, 26"],
html[data-kk-theme="white"] button[style*="#484f58"],
html[data-kk-theme="white"] button[style*="72, 79, 88"] {
  background: #e7edf5 !important;
  border-color: #d5deea !important;
  color: #8b97a8 !important;
}

/* 白色主题登录后同样透出这段视频，面板改成浅色玻璃。 */
html[data-kk-theme="white"]:not(:has(.login-split)) {
  --sidebar: rgba(255, 252, 247, .72);
  --card: rgba(255, 252, 247, .8);
}
html[data-kk-theme="white"]:not(:has(.login-split)) [data-slot="sidebar-inner"] {
  background-color: rgba(255, 252, 247, .72) !important;
  border-color: rgba(255, 255, 255, .7) !important;
  box-shadow: 0 18px 50px rgba(40, 24, 8, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html[data-kk-theme="white"]:not(:has(.login-split)) main > header {
  background: rgba(255, 252, 247, .66);
  border-bottom-color: rgba(180, 150, 100, .28);
}
html[data-kk-theme="white"]:not(:has(.login-split)) .bg-\[\#161b22\],
html[data-kk-theme="white"]:not(:has(.login-split)) .hover\:bg-\[\#161b22\]:hover {
  background-color: rgba(255, 252, 247, .8) !important;
}
html[data-kk-theme="white"]:not(:has(.login-split)) .bg-\[\#0d1117\],
html[data-kk-theme="white"]:not(:has(.login-split)) .bg-\[\#0d1117\]\/80,
html[data-kk-theme="white"]:not(:has(.login-split)) .bg-\[\#0d1117\]\/50 {
  background-color: rgba(255, 252, 247, .55) !important;
}
html[data-kk-theme="white"]:not(:has(.login-split)) .bg-\[\#1c2128\],
html[data-kk-theme="white"]:not(:has(.login-split)) .bg-\[\#21262d\] {
  background-color: rgba(255, 252, 247, .84) !important;
}
html[data-kk-theme="white"]:not(:has(.login-split)) [data-slot="dialog-content"],
html[data-kk-theme="white"]:not(:has(.login-split)) [data-slot="sheet-content"],
html[data-kk-theme="white"]:not(:has(.login-split)) [data-slot="popover-content"] {
  background-color: rgba(255, 252, 247, .96) !important;
}
html:not(:has(.login-split)) [data-zts-section] {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  color: #f3e6c4 !important;
}
html:not(:has(.login-split)) [data-zts-section]:hover {
  background: rgba(231, 211, 168, .12);
}
html:not(:has(.login-split)) [data-zts-section]::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 1.5px solid #e7d3a8;
  border-bottom: 1.5px solid #e7d3a8;
  transform: rotate(-45deg);
  margin-right: 4px;
  transition: transform .18s ease;
}
html:not(:has(.login-split)) [data-sidebar="group"][data-zts-open="1"] [data-zts-section]::after {
  transform: rotate(45deg);
}
html:not(:has(.login-split)) [data-sidebar="group"][data-zts-open="0"] [data-sidebar="menu"] {
  display: none !important;
}
html:not(:has(.login-split)) main > div.flex.flex-1.flex-col:has(> .zts-device-bar) {
  margin: 0 auto 12px;
  border-radius: 16px;
  background-color: rgba(14, 12, 10, .48);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  border: 1px solid rgba(243, 230, 196, .2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .08);
  min-height: 0;
}
.zts-device-bar {
  align-items: center;
  row-gap: 10px;
}
.zts-device-bar::before {
  content: "";
  order: 30;
  flex-basis: 100%;
  height: 1px;
  margin: 2px 0;
  background: rgba(243, 230, 196, .16);
}
.zts-device-bar > [data-zts-tool="hide"] { display: none !important; }
.zts-device-bar > [data-zts-tool="search"] {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 420px;
}
.zts-device-bar > [data-zts-lead="1"] { margin-left: auto; }
@media (max-width: 900px) {
  .zts-device-bar > [data-zts-lead="1"] { margin-left: 0; }
}
html:not(:has(.login-split)) .zts-device-bar > [data-zts-tool="danger"]:not(.cursor-not-allowed) {
  background-color: rgba(180, 48, 48, .18) !important;
  color: #ffb4b4 !important;
  border-color: rgba(220, 90, 90, .5) !important;
  --tw-ring-color: rgba(220, 90, 90, .35) !important;
}
@media (min-width: 768px) {
  html:not(:has(.login-split)) [data-slot="sidebar"] {
    width: 0 !important;
    min-width: 0 !important;
    flex: none !important;
    overflow: visible !important;
  }
  html:not(:has(.login-split)) [data-slot="sidebar-gap"] {
    display: none !important;
    width: 0 !important;
  }
  html:not(:has(.login-split)) [data-slot="sidebar-wrapper"]::before {
    content: "";
    position: fixed;
    z-index: 25;
    top: 8px;
    right: 8px;
    left: 8px;
    height: 104px;
    border-radius: 16px;
    pointer-events: none;
    background: rgba(8, 8, 10, .34);
    border: 1px solid rgba(243, 230, 196, .22);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
  }
  html:not(:has(.login-split)) [data-slot="sidebar-container"] {
    top: 8px !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    height: 56px !important;
    width: auto !important;
    padding: 0 !important;
    z-index: 32 !important;
    overflow: visible !important;
    background: transparent !important;
  }
  html:not(:has(.login-split)) [data-slot="sidebar-inner"] {
    flex-direction: row !important;
    align-items: center !important;
    height: 56px !important;
    overflow: visible !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html:not(:has(.login-split)) [data-slot="sidebar-header"] {
    flex: none;
    height: 56px;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 4px 0 14px !important;
  }
  html:not(:has(.login-split)) button[data-sidebar="menu-button"][data-zts-brand] {
    transform: translateY(24px);
  }
  html:not(:has(.login-split)) button[data-sidebar="menu-button"][data-zts-brand] img {
    height: 54px !important;
    max-width: 110px !important;
  }
  html:not(:has(.login-split)) button[data-sidebar="menu-button"][data-zts-brand] span {
    font-size: 28px !important;
    letter-spacing: 0.32em !important;
  }
  html:not(:has(.login-split)) [data-slot="sidebar-content"] {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    flex: none;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    width: max-content;
    height: 56px;
    overflow: visible !important;
    padding: 0 !important;
  }
  html:not(:has(.login-split)) [data-slot="sidebar-footer"] {
    display: none !important;
  }
  html:not(:has(.login-split)) [data-sidebar="group"] {
    width: auto !important;
    flex: none !important;
    position: relative;
    padding: 0 !important;
  }
  html:not(:has(.login-split)) [data-zts-section] {
    margin: 0 !important;
    height: 42px !important;
    padding: 0 18px !important;
    white-space: nowrap;
    font-size: 15px !important;
  }
  html:not(:has(.login-split)) [data-zts-section]::after {
    transform: rotate(45deg);
  }
  html:not(:has(.login-split)) [data-sidebar="group"][data-zts-open="1"] [data-zts-section] {
    background: rgba(231, 211, 168, .16);
  }
  html:not(:has(.login-split)) [data-sidebar="group"][data-zts-open="1"] [data-zts-section]::after {
    transform: rotate(225deg);
  }
  html:not(:has(.login-split)) [data-sidebar="group"]:not(:has([data-zts-section])) [data-sidebar="menu"] {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px;
  }
  html:not(:has(.login-split)) [data-sidebar="group"]:not(:has([data-zts-section])) [data-sidebar="menu-button"] {
    width: auto !important;
    height: 42px !important;
    padding: 0 18px !important;
    white-space: nowrap;
    font-size: 15px !important;
  }
  html:not(:has(.login-split)) [data-sidebar="group"][data-zts-open="1"]:has([data-zts-section]) [data-sidebar="menu"] {
    display: flex !important;
    flex-direction: column !important;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 168px;
    z-index: 60;
    margin: 0;
    padding: 6px;
    border-radius: 12px;
    background: rgba(10, 10, 12, .94);
    border: 1px solid rgba(243, 230, 196, .22);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  html:not(:has(.login-split)) [data-sidebar="group"]:has([data-zts-section]) [data-sidebar="menu-button"] {
    width: 100% !important;
    white-space: nowrap;
  }
  html:not(:has(.login-split)) main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    flex: 1 1 auto !important;
    padding-top: 120px;
  }
  html:not(:has(.login-split)) main > header {
    position: fixed;
    top: 64px;
    right: 18px;
    left: 8px;
    width: auto !important;
    height: 40px;
    z-index: 31;
    justify-content: flex-end;
    gap: 8px;
    border-radius: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  html:not(:has(.login-split)) main > header > .flex-1 {
    position: absolute;
    left: 50%;
    top: 0;
    height: 100%;
    transform: translateX(-50%);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: none !important;
    width: max-content !important;
    margin: 0 !important;
  }
  html:not(:has(.login-split)) main > header > button {
    transform: translateY(-24px);
  }
  html:not(:has(.login-split)) main > header > [data-sidebar="trigger"],
  html:not(:has(.login-split)) main > header > .shrink-0.flex.items-center {
    display: none !important;
  }
  html:not(:has(.login-split)) main > div.flex.flex-1.flex-col {
    width: min(1520px, 100%);
    max-width: 1520px;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  html:not(:has(.login-split)) main .grid.gap-4.mb-6.shrink-0 {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}
@media (min-width: 768px) and (max-width: 1320px) {
  html:not(:has(.login-split)) button[data-sidebar="menu-button"][data-zts-brand],
  html:not(:has(.login-split)) main > header > button {
    transform: none !important;
  }
}
@media (min-width: 768px) and (max-width: 1240px) {
  html:not(:has(.login-split)) button[data-sidebar="menu-button"][data-zts-brand] span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
  }
}
