/* ============================================================
   Zaka 暗黑皮肤  —  深空黑 / 毛玻璃 / 青色微光
   背景图居中显示,不铺满;覆盖全部菜单页面
   只做外观覆盖,不改任何功能逻辑
   ============================================================ */

:root {
  --zk-acc: #5ee0c6;
  --zk-acc-hi: #8bf5de;
  --zk-acc-dim: #2aa88f;
  --zk-cyan: #5cc8ff;
  --zk-ink: #05060a;
  --zk-panel: rgba(13, 16, 22, 0.74);
  --zk-panel-2: rgba(19, 22, 29, 0.80);
  --zk-panel-solid: #0d1016;
  --zk-line: rgba(255, 255, 255, 0.085);
  --zk-line-2: rgba(94, 224, 198, 0.38);
  --zk-text: #e9edf3;
  --zk-text-2: #9aa6b4;
  --zk-text-3: #7b8694;
  --zk-danger: #ff5a6a;
  --zk-warn: #ffc95c;
  --zk-info: #4fc3ff;
  --zk-r: 16px;
  --zk-r-sm: 10px;
  --zk-glow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 18px 48px rgba(0, 0, 0, 0.62);
  --zk-glass-blur: blur(18px) saturate(1.25);
  --zk-rail: 74px;
  --zk-rail-open: 214px;
}

/* ---------- 0. 底 & 背景动图层 ---------- */
html, body {
  background: #05060a !important;
  color: var(--zk-text) !important;
}
/* 背景图:居中显示,等比缩放,不铺满全屏 —— 蛇标居中留白 */
#zaka-bg {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("/assets/bg/zaka-bg2.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: var(--zk-bg-size, auto 68vh);
  opacity: var(--zk-bg-opacity, 0.52);
  filter: saturate(1.06) brightness(1.04);
  transition: opacity 0.6s ease;
}
#zaka-bg.zk-ready { opacity: var(--zk-bg-opacity, 0.52); }
/* 四周压暗,中央留亮,保证卡片上的字看得清 */
#zaka-bg-veil {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(72% 58% at 50% 48%, rgba(5, 6, 10, 0.20) 0%, rgba(5, 6, 10, 0.58) 58%, rgba(5, 6, 10, 0.90) 100%),
    linear-gradient(180deg, rgba(5, 6, 10, 0.50) 0%, rgba(5, 6, 10, 0.34) 45%, rgba(4, 5, 9, 0.66) 100%);
}
/* 细网格纹理(极淡) */
#zaka-bg-veil::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  -webkit-mask-image: radial-gradient(140% 100% at 50% -8%, #000 0%, rgba(0, 0, 0, 0.3) 55%, transparent 88%);
  mask-image: radial-gradient(140% 100% at 50% -8%, #000 0%, rgba(0, 0, 0, 0.3) 55%, transparent 88%);
}
.zk-app { position: relative; z-index: 2; }

/* ---------- 1. 布局骨架:透明化,让动图透出来 ---------- */
html body #root,
html body .ant-app,
html body .ant-layout,
html body .ant-layout-content,
html body main.ant-layout-content,
html body .ant-layout-header,
html body .ant-layout-sider,
html body .ant-layout-sider-children {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
}
html body .ant-layout-content { backdrop-filter: none !important; }

/* 干掉旧皮肤在内容区上的那张静态背景图 */
html body .ant-layout-content::before {
  content: none !important;
  background: none !important;
}
html body .ant-layout-content { position: relative !important; }

/* 内容区让出窄侧边栏的空间 */
html body .ant-layout-has-sider > .ant-layout {
  margin-left: var(--zk-rail) !important;
  transition: margin-left 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 100vh;
}

/* 侧栏展开(悬停 / 点击锁定)时,内容区同步右移让位 —— 推挤式布局,两侧永不重叠 */
html body.zk-rail-open .ant-layout-has-sider > .ant-layout {
  margin-left: var(--zk-rail-open) !important;
}

/* ---------- 2. 侧边栏:窄图标栏 + 悬停展开 ---------- */
html body aside.ant-layout-sider {
  position: fixed !important;
  left: 0; top: 0; bottom: 0;
  z-index: 90 !important;
  width: var(--zk-rail) !important;
  min-width: var(--zk-rail) !important;
  max-width: var(--zk-rail) !important;
  flex: 0 0 var(--zk-rail) !important;
  height: 100vh !important;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 11, 15, 0.96), rgba(5, 6, 9, 0.93)) !important;
  backdrop-filter: var(--zk-glass-blur);
  border-right: 1px solid var(--zk-line) !important;
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
  transition: width 0.26s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.26s !important;
}
html body.zk-rail-open aside.ant-layout-sider,
html body aside.ant-layout-sider:hover {
  width: var(--zk-rail-open) !important;
  min-width: var(--zk-rail-open) !important;
  max-width: var(--zk-rail-open) !important;
  box-shadow: 14px 0 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.09);
}
/* 锁定展开时,菜单文字/图标同步显示出来 */
html body.zk-rail-open aside.ant-layout-sider .zk-logo > div { opacity: 1; transform: none; }
html body.zk-rail-open aside.ant-layout-sider .ant-menu-item,
html body.zk-rail-open aside.ant-layout-sider .ant-menu-submenu-title {
  width: calc(var(--zk-rail-open) - 18px) !important;
}
html body.zk-rail-open aside.ant-layout-sider .ant-menu-title-content { opacity: 1; transform: none; }
html body .ant-layout-sider-children {
  display: flex; flex-direction: column;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}
html body .ant-layout-sider-children::-webkit-scrollbar { width: 0; }

/* logo 区 */
html body .zk-logo {
  flex: 0 0 auto;
  height: 74px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center;
  padding: 0 0 0 19px !important;
  position: relative;
  white-space: nowrap;
  border-bottom: 1px solid var(--zk-line);
}
html body .zk-logo::before {
  content: "";
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: radial-gradient(circle at 32% 28%, #8bf5de, #2ab89e 58%, #0a5a4d);
  box-shadow: 0 0 20px rgba(94, 224, 198, 0.42), inset 0 0 12px rgba(0, 0, 0, 0.4);
}
html body .zk-logo > div {
  margin-left: 13px;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  color: var(--zk-text) !important;
  opacity: 0; transform: translateX(-8px);
  transition: opacity 0.2s 0.04s, transform 0.2s 0.04s;
  text-shadow: 0 0 16px rgba(94, 224, 198, 0.35);
}
html body aside.ant-layout-sider:hover .zk-logo > div { opacity: 1; transform: none; }

/* 菜单 */
html body .ant-menu.ant-menu-dark,
html body ul.ant-menu {
  background: transparent !important;
  border-inline-end: none !important;
  padding: 10px 0 24px !important;
  width: 100% !important;
  flex: 1 1 auto;
}
html body .ant-menu-item,
html body .ant-menu-submenu-title {
  width: calc(var(--zk-rail) - 16px) !important;
  height: 48px !important;
  line-height: 48px !important;
  margin: 5px 8px !important;
  padding: 0 0 0 11px !important;
  border-radius: 13px !important;
  color: var(--zk-text-2) !important;
  display: flex !important;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.2s, color 0.2s, width 0.24s, box-shadow 0.2s;
  position: relative;
}
html body aside.ant-layout-sider:hover .ant-menu-item,
html body aside.ant-layout-sider:hover .ant-menu-submenu-title {
  width: calc(var(--zk-rail-open) - 18px) !important;
}
html body .ant-menu-item:hover,
html body .ant-menu-submenu-title:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: var(--zk-text) !important;
}
html body .ant-menu-item .anticon,
html body .ant-menu-submenu-title .anticon {
  font-size: 19px !important;
  margin: 0 !important;
  flex: 0 0 30px;
  width: 30px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: inherit;
}
html body .ant-menu-item .ant-menu-title-content,
html body .ant-menu-submenu-title .ant-menu-title-content,
html body .ant-menu-submenu-title .ant-menu-title-content {
  font-size: 13.5px;
  font-weight: 500;
  margin-inline-start: 10px !important;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.18s 0.03s, transform 0.18s 0.03s;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body aside.ant-layout-sider:hover .ant-menu-title-content { opacity: 1; transform: none; }
html body .ant-menu-item-selected {
  color: #04140f !important;
  background: linear-gradient(120deg, #63e8d0, #23ab92) !important;
  box-shadow: 0 6px 20px rgba(94, 224, 198, 0.3);
}
html body .ant-menu-item-selected .anticon { color: #04140f !important; }
html body .ant-menu-item-selected::after { display: none !important; }
html body .ant-menu-item::after { border-inline-end: none !important; }

/* 子菜单(设备分组)展开:做成浮层,窄栏也不挤 */
html body .ant-menu-submenu-open > .ant-menu-sub,
html body .ant-menu-submenu > .ant-menu-sub {
  background: rgba(12, 15, 20, 0.97) !important;
  border: 1px solid var(--zk-line) !important;
  border-radius: 12px !important;
  margin: 2px 8px 8px !important;
  padding: 4px !important;
  backdrop-filter: var(--zk-glass-blur);
}
html body .ant-menu-sub .ant-menu-item {
  height: 38px !important;
  line-height: 38px !important;
  font-size: 13px;
  width: calc(var(--zk-rail-open) - 34px) !important;
  margin: 2px 4px !important;
  padding-left: 12px !important;
}
html body .ant-menu-sub .ant-menu-title-content { opacity: 1 !important; transform: none !important; }
html body .ant-menu-submenu-arrow { color: var(--zk-text-3) !important; right: 14px !important; }

/* ---------- 3. 顶栏 ---------- */
html body header.ant-layout-header {
  height: 56px !important;
  line-height: normal !important;
  padding: 0 18px 0 16px !important;
  display: flex !important;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(10, 12, 17, 0.80), rgba(8, 10, 14, 0.62)) !important;
  backdrop-filter: var(--zk-glass-blur);
  border-bottom: 1px solid var(--zk-line) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: sticky !important;
  top: 0;
  z-index: 40;
}
html body header.ant-layout-header > div:first-child > div:last-child {
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: var(--zk-text) !important;
  letter-spacing: 0.02em;
  padding-left: 4px;
  border-left: 2px solid var(--zk-acc);
  padding-inline-start: 11px;
  line-height: 1.1;
}
html body header.ant-layout-header span,
html body header.ant-layout-header div { color: var(--zk-text-2); }
html body header.ant-layout-header .ant-btn-text { color: var(--zk-text-2) !important; }

html body header.ant-layout-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 224, 198, 0.38) 18%, rgba(92, 200, 255, 0.24) 62%, transparent);
  pointer-events: none;
}

/* 工具栏面板 */
html body .zk-toolbar {
  background: var(--zk-panel) !important;
  border: 1px solid var(--zk-line) !important;
  border-radius: var(--zk-r) !important;
  backdrop-filter: var(--zk-glass-blur);
  padding: 12px 14px 10px !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42);
  margin-bottom: 14px;
}

/* ---------- 4. 内容区 ---------- */
html body main.ant-layout-content { padding: 0 !important; }
html body main.ant-layout-content > div {
  padding: 18px 20px 26px !important;
  background: transparent !important;
  min-height: calc(100vh - 56px);
}

/* 通用面板:凡是白底/浅底的大块,统一成毛玻璃卡 */
html body .zk-panel,
html body .ant-card,
html body .ant-modal-content,
html body .ant-drawer-content,
html body .ant-table-wrapper,
html body .ant-pagination,
html body .ant-tabs,
html body .ant-collapse,
html body .ant-descriptions,
html body .ant-list {
  background: var(--zk-panel) !important;
  backdrop-filter: var(--zk-glass-blur);
  border: 1px solid var(--zk-line) !important;
  border-radius: var(--zk-r) !important;
  box-shadow: var(--zk-glow);
  color: var(--zk-text) !important;
}
html body .ant-card-head,
html body .ant-modal-header,
html body .ant-drawer-header {
  background: transparent !important;
  border-bottom: 1px solid var(--zk-line) !important;
  color: var(--zk-text) !important;
}
html body .ant-modal-content, html body .ant-drawer-content { padding: 0 !important; }
html body .ant-modal-body, html body .ant-drawer-body { color: var(--zk-text) !important; }

/* 设备卡片 */
html body .zk-device-card {
  background: linear-gradient(165deg, rgba(19, 23, 30, 0.82), rgba(10, 12, 17, 0.88)) !important;
  backdrop-filter: var(--zk-glass-blur);
  border: 1px solid var(--zk-line) !important;
  border-radius: var(--zk-r) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  overflow: hidden;
}
html body .zk-device-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 224, 198, 0.42), rgba(92, 200, 255, 0.26), transparent);
  pointer-events: none;
}
html body .zk-device-card { position: relative; }
html body .zk-device-card:hover {
  transform: translateY(-3px);
  border-color: var(--zk-line-2) !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255, 255, 255, 0.10);
}
html body .zk-device-card .zk-device-head {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012)) !important;
  border-bottom: 1px solid var(--zk-line) !important;
}
html body .zk-device-actions { border-top: 1px solid var(--zk-line) !important; }

/* ---------- 5. AntD 组件深色化 ---------- */
html body .ant-input,
html body .ant-input-affix-wrapper,
html body .ant-input-number,
html body .ant-picker,
html body textarea.ant-input,
html body .ant-select .ant-select-selector {
  background: rgba(10, 12, 17, 0.74) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: var(--zk-text) !important;
  border-radius: var(--zk-r-sm) !important;
  box-shadow: none !important;
}
html body .ant-input::placeholder,
html body .ant-input-affix-wrapper input::placeholder { color: var(--zk-text-3) !important; }
html body .ant-input:hover, html body .ant-input:focus,
html body .ant-select:hover .ant-select-selector,
html body .ant-select-focused .ant-select-selector {
  border-color: var(--zk-line-2) !important;
  box-shadow: 0 0 0 3px rgba(94, 224, 198, 0.10) !important;
}
html body .ant-select-selection-item,
html body .ant-select-selection-placeholder,
html body .ant-select-arrow,
html body .ant-select .anticon { color: var(--zk-text-2) !important; }
html body .ant-select-dropdown,
html body .ant-dropdown-menu,
html body .ant-picker-dropdown .ant-picker-panel-container {
  background: rgba(12, 15, 20, 0.97) !important;
  border: 1px solid var(--zk-line) !important;
  border-radius: 12px !important;
  backdrop-filter: var(--zk-glass-blur);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6) !important;
}
html body .ant-select-item,
html body .ant-dropdown-menu-item { color: var(--zk-text-2) !important; border-radius: 8px !important; }
html body .ant-select-item-option-active,
html body .ant-select-item-option-selected,
html body .ant-dropdown-menu-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--zk-text) !important;
}

/* 按钮 */
html body .ant-btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
}
html body .ant-btn-default,
html body .ant-btn-color-default.ant-btn-variant-outlined {
  background: rgba(15, 18, 24, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.11) !important;
  color: var(--zk-text-2) !important;
}
html body .ant-btn-default:hover {
  border-color: var(--zk-line-2) !important;
  color: var(--zk-text) !important;
  background: rgba(255, 255, 255, 0.07) !important;
}
html body .ant-btn-primary {
  background: linear-gradient(140deg, #63e8d0, #21a88f) !important;
  border: none !important;
  color: #04140f !important;
  box-shadow: 0 6px 18px rgba(94, 224, 198, 0.28) !important;
  text-shadow: none !important;
}
html body .ant-btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(94, 224, 198, 0.4) !important;
}
html body .ant-btn-text { color: var(--zk-text-2) !important; }
html body .ant-btn-text:hover { color: var(--zk-acc-hi) !important; background: rgba(255, 255, 255, 0.07) !important; }
html body .ant-btn-dangerous,
html body .ant-btn-primary.ant-btn-dangerous {
  background: linear-gradient(140deg, #ff6b7a, #d8384a) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(216, 56, 74, 0.32) !important;
}

/* 表格 */
html body .ant-table,
html body .ant-table-container,
html body .ant-table-content,
html body .ant-table-body,
html body .ant-table-header { background: transparent !important; }
html body .ant-table-thead > tr > th {
  background: rgba(255, 255, 255, 0.045) !important;
  color: var(--zk-text-2) !important;
  border-bottom: 1px solid var(--zk-line) !important;
  font-weight: 600 !important;
  font-size: 12.5px;
}
html body .ant-table-tbody > tr > td {
  background: transparent !important;
  color: var(--zk-text) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
html body .ant-table-tbody > tr:hover > td { background: rgba(255, 255, 255, 0.04) !important; }
html body .ant-table-placeholder:hover > td { background: transparent !important; }
html body .ant-empty-description { color: var(--zk-text-3) !important; }

/* 分页 */
html body .ant-pagination { padding: 6px 10px; }
html body .ant-pagination .ant-pagination-item a,
html body .ant-pagination .ant-pagination-total-text,
html body .ant-pagination .ant-pagination-options { color: var(--zk-text-2) !important; }
html body .ant-pagination-item {
  background: rgba(15, 18, 24, 0.72) !important;
  border: 1px solid var(--zk-line) !important;
  border-radius: 9px !important;
}
html body .ant-pagination-item-active {
  background: linear-gradient(140deg, #63e8d0, #21a88f) !important;
  border-color: transparent !important;
}
html body .ant-pagination-item-active a { color: #04140f !important; font-weight: 700; }

/* 标签 / 徽标 / 提示 */
html body .ant-tag {
  border-radius: 7px !important;
  border-width: 1px !important;
  font-weight: 600;
  background: rgba(94, 224, 198, 0.14) !important;
  color: var(--zk-acc-hi) !important;
  border-color: rgba(94, 224, 198, 0.30) !important;
}
html body .ant-badge-count { box-shadow: 0 0 0 2px rgba(6, 12, 10, 0.9) !important; }
html body .ant-checkbox-inner {
  background: rgba(6, 14, 11, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  border-radius: 5px !important;
}
html body .ant-checkbox-checked .ant-checkbox-inner {
  background: var(--zk-acc) !important;
  border-color: var(--zk-acc) !important;
}
html body .ant-switch { background: rgba(255, 255, 255, 0.16) !important; }
html body .ant-switch-checked { background: linear-gradient(120deg, #63e8d0, #23ab92) !important; }
html body .ant-tooltip-inner {
  background: rgba(12, 15, 20, 0.97) !important;
  color: var(--zk-text) !important;
  border: 1px solid var(--zk-line) !important;
  border-radius: 10px !important;
  font-size: 12.5px;
}
html body .ant-tooltip-arrow::before { background: rgba(12, 15, 20, 0.97) !important; }
html body .ant-message-notice-content {
  background: rgba(12, 15, 20, 0.95) !important;
  border: 1px solid var(--zk-line) !important;
  color: var(--zk-text) !important;
  border-radius: 12px !important;
  backdrop-filter: var(--zk-glass-blur);
}
html body .ant-notification-notice {
  background: rgba(12, 15, 20, 0.95) !important;
  border: 1px solid var(--zk-line) !important;
  border-radius: 14px !important;
}
html body .ant-notification-notice-message,
html body .ant-notification-notice-description { color: var(--zk-text) !important; }

/* 空状态 / 分割线 / 滚动条 */
html body .ant-divider { border-color: var(--zk-line) !important; }
html body .ant-divider-inner-text { color: var(--zk-text-3) !important; }
html body *::-webkit-scrollbar { width: 8px; height: 8px; }
html body *::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); }
html body *::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}
html body *::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.30); background-clip: content-box; }

/* ---------- 6. 图片自适应(照片尺寸不乱) ---------- */
html body .zk-app img,
html body .zk-app .ant-avatar img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
}
html body .zk-app .zk-autofit {
  width: 100% !important;
  height: auto !important;
  max-height: 420px;
  object-fit: contain !important;
  background: rgba(0, 0, 0, 0.35);
}
html body .zk-app .zk-autofit-cover {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
html body .zk-media-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--zk-line);
}
html body .zk-media-box > img,
html body .zk-media-box > video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- 7. 细粒度修正 ---------- */
html body .ant-space-item > .ant-btn-sm { height: 30px !important; }
html body .ant-btn > span:not(.ant-btn-icon) { letter-spacing: 0.01em; }
html body .ant-input[disabled], html body .ant-input[readonly] {
  background: rgba(7, 9, 13, 0.6) !important; color: var(--zk-text-3) !important;
}
html body a { color: var(--zk-acc-hi) !important; }
html body .ant-spin-dot-item { background-color: var(--zk-acc) !important; }
html body .ant-modal-mask, html body .ant-drawer-mask { background: rgba(2, 5, 5, 0.72) !important; backdrop-filter: blur(3px); }
html body .ant-modal-close, html body .ant-drawer-close { color: var(--zk-text-2) !important; }

/* 让所有浅色实底块变玻璃(内联白底/浅灰底兜底) */
html body .zk-app [data-zk="glass"] {
  background: var(--zk-panel) !important;
  border: 1px solid var(--zk-line) !important;
  border-radius: var(--zk-r) !important;
  backdrop-filter: var(--zk-glass-blur);
  box-shadow: var(--zk-glow);
}
html body .zk-app [data-zk="glass-flat"] {
  background: rgba(15, 18, 24, 0.58) !important;
  border: 1px solid var(--zk-line) !important;
  border-radius: var(--zk-r-sm) !important;
}

/* 状态文字发光 */
html body [data-zk-state="offline"] {
  color: #ff6f7d !important;
  font-weight: 700 !important;
  text-shadow: 0 0 14px rgba(255, 90, 106, 0.5);
}
html body [data-zk-state="online"] {
  color: #5df0c0 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 14px rgba(94, 224, 198, 0.5);
}

/* 卡片底部的圆形功能按钮 */
html body .zk-device-card button.ant-btn-circle,
html body .zk-device-card .ant-btn.ant-btn-circle {
  background: rgba(255, 255, 255, 0.055) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: #cfd8e0 !important;
  transition: all 0.18s !important;
}
html body .zk-device-card button.ant-btn-circle:hover {
  background: rgba(94, 224, 198, 0.16) !important;
  border-color: rgba(94, 224, 198, 0.45) !important;
  color: #eafffa !important;
  box-shadow: 0 0 16px rgba(94, 224, 198, 0.26);
  transform: translateY(-1px);
}
html body .zk-device-card button.ant-btn-circle .anticon { color: inherit !important; }

/* 卡片信息行:细分隔 + 悬停高亮 */
html body .zk-device-card .zk-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}
html body .zk-device-card .zk-row:hover { background: rgba(255, 255, 255, 0.035); }

/* 登录卡片 */
html body .zk-login-card {
  background: linear-gradient(160deg, rgba(18, 21, 28, 0.80), rgba(9, 11, 15, 0.88)) !important;
  backdrop-filter: var(--zk-glass-blur);
  border: 1px solid var(--zk-line) !important;
  border-radius: 20px !important;
  padding: 26px 26px 20px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(255, 255, 255, 0.07), 0 0 70px rgba(94, 224, 198, 0.06) !important;
  position: relative;
  overflow: hidden;
}
html body .zk-login-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(94, 224, 198, 0.6), transparent);
}

/* 设备名称值强调 */
html body .zk-device-card .zk-dn {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #ecfffa !important;
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px rgba(94, 224, 198, 0.2);
}

/* ---------- 8. 响应式 ---------- */
@media (max-width: 1100px) {
  :root { --zk-rail: 64px; --zk-rail-open: 196px; --zk-bg-size: auto 52vh; }
  html body main.ant-layout-content > div { padding: 14px 14px 22px !important; }
}
@media (max-width: 720px) {
  :root { --zk-rail: 58px; --zk-rail-open: 180px; --zk-bg-size: auto 38vh; }
  html body aside.ant-layout-sider { position: fixed !important; }
  /* 窄屏空间不够,侧栏展开保持浮层,内容不再让位 */
  html body.zk-rail-open .ant-layout-has-sider > .ant-layout { margin-left: var(--zk-rail) !important; }
  html body header.ant-layout-header { padding: 0 10px !important; }
  html body header.ant-layout-header > div:nth-child(2) { display: none !important; }
  html body .zk-device-card { border-radius: 14px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #zaka-bg { display: none; }
  html body * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ============================================================
   9. 安卓远控页 — 主按钮统一红色(列表页 + 控制面板页)
   与「批量删除」按钮同底色(#ff6b7a -> #d8384a 渐变)
   作用域:body.zk-android-red(菜单选中"安卓远控" 或 URL 带 controlDeviceId 时打标)
   覆盖整页(含新标签打开的控制面板),不再限定 main / modal 容器
   ============================================================ */
html body.zk-android-red .ant-btn-primary:not(.ant-btn-dangerous) {
  background-image: linear-gradient(140deg, #ff6b7a, #d8384a) !important;
  background-color: transparent !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(216, 56, 74, 0.32) !important;
  text-shadow: none !important;
}
html body.zk-android-red .ant-btn-primary:not(.ant-btn-dangerous):hover {
  background-image: linear-gradient(140deg, #ff8593, #e0475a) !important;
  box-shadow: 0 8px 24px rgba(216, 56, 74, 0.44) !important;
  filter: brightness(1.03) !important;
}
html body.zk-android-red .ant-btn-primary:not(.ant-btn-dangerous) > span,
html body.zk-android-red .ant-btn-primary:not(.ant-btn-dangerous) .anticon {
  color: #fff !important;
}
html body.zk-android-red .ant-btn-primary:not(.ant-btn-dangerous):disabled,
html body.zk-android-red .ant-btn-primary:not(.ant-btn-dangerous).ant-btn-disabled {
  opacity: 0.55 !important;
  filter: grayscale(0.25) !important;
}

/* 控制面板内部 tab / 分段控件的高亮:绿色 -> 红色(与主按钮一致) */
html body.zk-android-red .ant-tabs-tab.ant-tabs-tab-active,
html body.zk-android-red .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn,
html body.zk-android-red .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn > span,
html body.zk-android-red .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn .anticon {
  color: #ff6b7a !important;
}
html body.zk-android-red .ant-tabs-tab:hover .ant-tabs-tab-btn,
html body.zk-android-red .ant-tabs-tab:hover {
  color: #ff8593 !important;
}
html body.zk-android-red .ant-tabs-ink-bar {
  background: linear-gradient(90deg, #ff6b7a, #d8384a) !important;
}
