/* HUD / 控制台壳层 — 仅视觉，勿改业务脚本 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', monospace;
  --font-sans: var(--font-mono);
  --el-font-family: var(--font-mono);
}

:root[data-theme='light'],
:root:not([data-theme]) {
  --background: #f4f6fb;
  --foreground: #0b1220;
  --muted: #64748b;
  --card: rgba(255, 255, 255, 0.82);
  --card-solid: #fcfcfc;
  --border: rgba(15, 23, 42, 0.1);
  --ring: rgba(79, 70, 229, 0.35);
  --primary: #4f46e5;
  --primary-foreground: #f8fafc;
  --secondary: #0f172a;
  --accent: #22d3ee;
  --destructive: #dc2626;
  --sidebar: #0c1222;
  --sidebar-foreground: rgba(248, 250, 252, 0.88);
  --sidebar-border: rgba(148, 163, 184, 0.12);
  --hud-grid: rgba(79, 70, 229, 0.07);
  --hud-glow: rgba(79, 70, 229, 0.12);
  --radius: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  /* Element Plus 主色链与 HUD 对齐（避免按钮/链接仍为默认蓝） */
  --el-color-primary: #4f46e5;
  --el-color-primary-light-3: #7c73ed;
  --el-color-primary-light-5: #9890f0;
  --el-color-primary-light-7: #b4aef5;
  --el-color-primary-light-8: #c7c2f7;
  --el-color-primary-light-9: #e8e6fc;
  --el-color-primary-dark-2: #3730a3;
}

:root[data-theme='dark'] {
  --background: #070b12;
  --foreground: #e2e8f0;
  --muted: #94a3b8;
  --card: rgba(15, 23, 42, 0.72);
  --card-solid: #0f172a;
  --border: rgba(148, 163, 184, 0.14);
  --ring: rgba(129, 140, 248, 0.45);
  --primary: #818cf8;
  --primary-foreground: #0b1220;
  --secondary: #f1f5f9;
  --accent: #22d3ee;
  --destructive: #f87171;
  --sidebar: #050810;
  --sidebar-foreground: rgba(248, 250, 252, 0.9);
  --sidebar-border: rgba(148, 163, 184, 0.1);
  --hud-grid: rgba(129, 140, 248, 0.08);
  --hud-glow: rgba(129, 140, 248, 0.15);
  --el-color-primary: #818cf8;
  --el-color-primary-light-3: #9aa4fa;
  --el-color-primary-light-5: #a8b0fb;
  --el-color-primary-light-7: #c7ccf9;
  --el-color-primary-light-8: #d8dbf9;
  --el-color-primary-light-9: #e9ebfd;
  --el-color-primary-dark-2: #4c51bf;
}

html,
body,
#app {
  font-family: var(--font-mono);
  color: var(--foreground);
  background-color: var(--background);
}

/* 4.1 基底 + 坐标网格 */
.hud-app::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, var(--hud-glow), transparent 58%),
    radial-gradient(760px 480px at 96% 4%, rgba(34, 211, 238, 0.06), transparent 52%),
    linear-gradient(180deg, var(--background), var(--background));
  animation: hud-ambient 22s ease-in-out infinite alternate;
}

.hud-app::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--hud-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hud-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 42%, #000 22%, transparent 72%);
  opacity: 0.85;
  animation: hud-grid-drift 56s linear infinite;
}

@keyframes hud-ambient {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(12deg);
  }
}

@keyframes hud-grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 44px 22px, 44px 22px;
  }
}

.hud-app > * {
  position: relative;
  z-index: 1;
}

/* 5.1 顶栏铬层 + 扫光 */
.hud-top-chrome {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 56px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  background: linear-gradient(
      115deg,
      color-mix(in srgb, var(--card-solid) 88%, transparent),
      color-mix(in srgb, var(--primary) 8%, transparent),
      color-mix(in srgb, var(--card-solid) 92%, transparent)
    ),
    var(--card-solid);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--primary) 22%, transparent);
}

.hud-top-chrome::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 55%
  );
  mix-blend-mode: overlay;
  opacity: 0.38;
  transform: translateX(-40%);
  animation: hud-chrome-sweep 12s ease-in-out infinite;
}

@keyframes hud-chrome-sweep {
  0%,
  100% {
    transform: translateX(-55%);
  }
  50% {
    transform: translateX(55%);
  }
}

.hud-top-chrome-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  min-height: 56px;
}

@media (min-width: 900px) {
  .hud-top-chrome,
  .hud-top-chrome-inner {
    min-height: 64px;
  }
}

/* 主内容区高度：扣除顶栏，单滚动 */
.hud-app .router-view-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* 5.2 舞台容器 — 背景/阴影由文末「业务页 shell」高优先级规则统一（避免与 scoped 灰底冲突） */
.shell-layout-root .content-area {
  position: relative;
  border-radius: var(--radius-xl) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border)) !important;
  animation: hud-stage-breathe 5.5s ease-in-out infinite alternate;
}

@keyframes hud-stage-breathe {
  from {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.5),
      0 0 0 1px color-mix(in srgb, var(--primary) 5%, transparent),
      0 20px 50px color-mix(in srgb, var(--primary) 8%, transparent),
      0 36px 80px rgba(15, 23, 42, 0.05);
  }
  to {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.62),
      0 0 0 1px color-mix(in srgb, var(--primary) 12%, transparent),
      0 26px 64px color-mix(in srgb, var(--primary) 14%, transparent),
      0 44px 100px rgba(15, 23, 42, 0.07);
  }
}

@keyframes hud-stage-breathe-dark {
  from {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 0 0 1px color-mix(in srgb, var(--primary) 10%, transparent),
      0 18px 48px color-mix(in srgb, var(--primary) 14%, transparent),
      0 32px 72px rgba(0, 0, 0, 0.45);
  }
  to {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 0 1px color-mix(in srgb, var(--primary) 20%, transparent),
      0 24px 56px color-mix(in srgb, var(--primary) 22%, transparent),
      0 40px 88px rgba(0, 0, 0, 0.55);
  }
}

/* 页首 HUD */
.hud-page-hero {
  position: relative;
  padding: 22px 22px 20px 28px;
  margin-bottom: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--card-solid) 92%, transparent),
    color-mix(in srgb, var(--primary) 6%, transparent)
  );
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.hud-page-hero::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  opacity: 0.85;
}

.hud-hud-corners {
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--primary) 45%, transparent);
  border-radius: calc(var(--radius-xl) - 6px);
  clip-path: polygon(
    0 0,
    18px 0,
    18px 2px,
    2px 2px,
    2px 18px,
    0 18px,
    0 0,
    100% 0,
    calc(100% - 18px) 0,
    calc(100% - 18px) 2px,
    calc(100% - 2px) 2px,
    calc(100% - 2px) 18px,
    100% 18px,
    100% 0,
    100% 100%,
    calc(100% - 18px) 100%,
    calc(100% - 18px) calc(100% - 2px),
    calc(100% - 2px) calc(100% - 2px),
    calc(100% - 2px) calc(100% - 18px),
    100% calc(100% - 18px),
    100% 100%,
    0 100%,
    18px 100%,
    18px calc(100% - 2px),
    2px calc(100% - 2px),
    2px calc(100% - 18px),
    0 calc(100% - 18px),
    0 100%
  );
  opacity: 0.35;
}

.hud-page-hero h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--foreground), var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hud-page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.55;
}

.hud-hero-divider {
  margin-top: 14px;
  height: 2px;
  max-width: 360px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), transparent);
  opacity: 0.65;
}

/* 路由进场 */
.hud-route-enter-active {
  transition:
    opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}
.hud-route-leave-active {
  transition: opacity 0.2s ease;
}
.hud-route-enter-from {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
}
.hud-route-leave-to {
  opacity: 0;
}

/* 表格 HUD（全局，依赖 .hud-app） */
.hud-app .el-table {
  --el-table-border-color: var(--border);
  --el-table-header-bg-color: color-mix(in srgb, var(--card-solid) 88%, transparent);
}

.hud-app .el-table__header-wrapper th.el-table__cell {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted) !important;
  background: transparent !important;
}

.hud-app .el-table__body td.el-table__cell {
  font-family: var(--font-mono);
}

.hud-app .el-table__body tr:hover > td.el-table__cell {
  background-color: color-mix(in srgb, var(--primary) 6%, transparent) !important;
  box-shadow: inset 4px 0 0 0 color-mix(in srgb, var(--primary) 55%, transparent);
}

/* 减少动态 */
@media (prefers-reduced-motion: reduce) {
  .hud-app::before,
  .hud-app::after,
  .hud-top-chrome::before,
  .shell-layout-root .content-area,
  .hud-app .shell-layout-root > .main-container > .content-area {
    animation: none !important;
  }
  .hud-route-enter-active {
    transition: opacity 0.18s ease;
  }
  .hud-route-enter-from {
    transform: none;
    scale: 1;
  }
  .shell-card-elevated:hover {
    transform: none !important;
  }
  .sidebar-menu {
    transition: width 0.2s linear !important;
  }
  .sidebar-menu .el-menu-item,
  .sidebar-menu .el-menu-item.is-active {
    transform: none !important;
  }
}

/* 登录/注册：左右分栏（Grid 固定两列，避免 flex 在嵌套列布局下被压成上下块） */
.hud-auth {
  display: grid;
  grid-template-columns: minmax(260px, min(44vw, 520px)) minmax(0, 1fr);
  grid-template-rows: 1fr;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  position: relative;
  overflow-x: hidden;
}

.hud-auth-brand {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  background: var(--background);
  color: var(--foreground);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hud-auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hud-auth-brand h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hud-auth-brand .accent {
  color: var(--primary);
}

.hud-auth-brand ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  width: 100%;
}

.hud-auth-brand ul li {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  text-align: left;
}

.hud-auth-brand li::before {
  content: '▍';
  color: var(--primary);
  margin-right: 0;
  font-weight: 700;
  flex-shrink: 0;
}

.hud-auth-panel {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--background);
}

.hud-page-hero-inner {
  position: relative;
  z-index: 1;
}

.hud-auth-form-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 28px 26px;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  background: color-mix(in srgb, var(--card-solid) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 18px 48px rgba(15, 23, 42, 0.08),
    0 0 0 1px color-mix(in srgb, var(--primary) 8%, transparent);
}

/* ========== 夜间全局：html.dark 与 data-theme=dark 同步（useHudTheme） ========== */

html.dark .hud-top-chrome::before {
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(129, 140, 248, 0.28) 45%,
    transparent 55%
  );
  mix-blend-mode: screen;
  opacity: 0.26;
}

html.dark .hud-page-hero {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

html.dark .hud-app .el-breadcrumb__inner {
  color: var(--el-text-color-regular) !important;
  font-weight: 500;
}

html.dark .hud-app .el-breadcrumb__item:last-child .el-breadcrumb__inner,
html.dark .hud-app .el-breadcrumb__item:last-child .el-breadcrumb__inner:hover {
  color: var(--el-text-color-primary) !important;
  cursor: default;
}

html.dark .hud-app .shell-layout-root .el-card {
  --el-card-bg-color: color-mix(in srgb, var(--card-solid) 88%, transparent);
  background-color: var(--el-card-bg-color) !important;
  border-color: var(--el-border-color) !important;
}

html.dark .hud-app .shell-layout-root .el-card__header {
  border-bottom-color: var(--el-border-color);
  color: var(--el-text-color-primary);
}

html.dark .hud-app .el-table {
  --el-table-bg-color: color-mix(in srgb, var(--card-solid) 91%, var(--primary) 9%);
  --el-table-tr-bg-color: color-mix(in srgb, var(--card-solid) 93%, var(--primary) 7%);
  --el-table-header-bg-color: color-mix(in srgb, var(--card-solid) 82%, var(--primary) 14%);
  --el-table-row-hover-bg-color: color-mix(in srgb, var(--primary) 16%, var(--card-solid));
  --el-table-current-row-bg-color: color-mix(in srgb, var(--primary) 12%, var(--card-solid));
}

html.dark .hud-app .el-pagination {
  --el-pagination-bg-color: transparent;
  --el-pagination-text-color: var(--el-text-color-regular);
  --el-pagination-button-color: var(--el-text-color-regular);
  --el-pagination-button-disabled-bg-color: color-mix(in srgb, var(--card-solid) 90%, var(--primary) 5%);
}

html.dark .hud-app .el-pagination .el-input__wrapper {
  background-color: color-mix(in srgb, var(--card-solid) 88%, var(--primary) 10%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 22%, var(--el-border-color)) inset;
}

/* 默认按钮：避免与纯黑底融在一起 */
html.dark .hud-app .el-button--default {
  --el-button-bg-color: color-mix(in srgb, var(--card-solid) 88%, var(--primary) 10%);
  --el-button-border-color: color-mix(in srgb, var(--primary) 32%, var(--el-border-color));
  --el-button-hover-bg-color: color-mix(in srgb, var(--primary) 18%, var(--card-solid));
  --el-button-hover-border-color: color-mix(in srgb, var(--primary) 45%, var(--el-border-color));
}

html.dark .hud-app .el-input__wrapper {
  background-color: color-mix(in srgb, var(--card-solid) 90%, var(--primary) 8%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 20%, var(--el-border-color)) inset;
}

html.dark .detection-records-container,
html.dark .operation-logs-container,
html.dark .media-library-container,
html.dark .model-library-container,
html.dark .user-management-container,
html.dark .disease-detection-container,
html.dark .home-container {
  background-color: transparent !important;
}

html.dark .agent-drawer .drawer-title {
  color: var(--el-text-color-primary);
}

html.dark .agent-drawer .messages {
  background: var(--el-fill-color-dark);
  border-color: var(--el-border-color);
}

html.dark .agent-drawer .assistant .bubble {
  background: var(--el-bg-color-overlay);
  color: var(--el-text-color-primary);
  border-color: var(--el-border-color);
}

html.dark .agent-drawer .typing {
  color: var(--el-text-color-secondary);
}

html.dark .hud-app .card-header h2 {
  color: var(--el-text-color-primary);
}

html.dark .hud-app .model-info-card,
html.dark .hud-app .detection-summary,
html.dark .hud-app .disease-detection-container .preview-container {
  background-color: var(--el-fill-color-dark) !important;
  border: 1px solid var(--el-border-color) !important;
  color: var(--el-text-color-primary);
}

html.dark .hud-app .model-info-card h3,
html.dark .hud-app .model-info-card h4,
html.dark .hud-app .detection-summary h4,
html.dark .hud-app .model-info-card .info-label,
html.dark .hud-app .detection-summary .summary-label {
  color: var(--el-text-color-secondary);
}

html.dark .hud-app .model-info-card .info-value,
html.dark .hud-app .detection-summary .summary-value {
  color: var(--el-text-color-primary);
}

html.dark .hud-app .preview-placeholder {
  color: var(--el-text-color-secondary);
}

/* 列表页「条件筛选」：各视图 scoped 内写死 #f8f9fa，夜间统一拉回 Element 深色面 */
html.dark .hud-app .search-form {
  background-color: var(--el-fill-color-dark) !important;
  border: 1px solid var(--el-border-color) !important;
}

html.dark .hud-app .search-form .el-form-item__label {
  color: var(--el-text-color-regular) !important;
}

html.dark .hud-app .date-separator {
  color: var(--el-text-color-secondary);
}

/* 检测分割记录详情里与筛选同色的信息块 */
html.dark .hud-app .result-content,
html.dark .hud-app .detection-params,
html.dark .hud-app .detection-stats {
  background-color: var(--el-fill-color-dark) !important;
  border: 1px solid var(--el-border-color);
  color: var(--el-text-color-primary);
}

/* ========== 业务页 shell：统一覆盖各视图 scoped 内灰/蓝灰底，与 HUD 靛紫 + 青色点缀一致 ========== */

.hud-app .home-container,
.hud-app .media-library-container,
.hud-app .model-library-container,
.hud-app .user-management-container,
.hud-app .disease-detection-container,
.hud-app .detection-records-container,
.hud-app .operation-logs-container {
  background-color: transparent !important;
}

.hud-app .shell-layout-root > .main-container > .content-area {
  background-color: transparent !important;
  background-image: linear-gradient(
    155deg,
    color-mix(in srgb, var(--card-solid) 96%, var(--primary) 4%) 0%,
    color-mix(in srgb, var(--card-solid) 86%, var(--primary) 12%) 52%,
    color-mix(in srgb, var(--card-solid) 93%, var(--accent) 6%) 100%
  ) !important;
  border-radius: var(--radius-xl) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 14%, var(--border)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 0 0 1px color-mix(in srgb, var(--primary) 7%, transparent),
    0 22px 56px color-mix(in srgb, var(--primary) 11%, rgba(15, 23, 42, 0.06)) !important;
  animation: hud-stage-breathe 5.5s ease-in-out infinite alternate;
}

html.dark .hud-app .shell-layout-root > .main-container > .content-area {
  background-image: linear-gradient(
    155deg,
    color-mix(in srgb, var(--card-solid) 91%, var(--primary) 9%) 0%,
    color-mix(in srgb, var(--card-solid) 72%, var(--primary) 24%) 48%,
    color-mix(in srgb, var(--card-solid) 86%, var(--accent) 10%) 100%
  ) !important;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px color-mix(in srgb, var(--primary) 12%, transparent),
    0 20px 48px rgba(0, 0, 0, 0.42) !important;
  animation: hud-stage-breathe-dark 5.5s ease-in-out infinite alternate;
}

.hud-app .shell-layout-root .media-card,
.hud-app .shell-layout-root .model-card,
.hud-app .shell-layout-root .user-card,
.hud-app .shell-layout-root .detection-card,
.hud-app .shell-layout-root .records-card,
.hud-app .shell-layout-root .logs-card {
  background: color-mix(in srgb, var(--card-solid) 93%, var(--primary) 5%) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border)) !important;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--primary) 9%, rgba(15, 23, 42, 0.07)) !important;
}

html.dark .hud-app .shell-layout-root .media-card,
html.dark .hud-app .shell-layout-root .model-card,
html.dark .hud-app .shell-layout-root .user-card,
html.dark .hud-app .shell-layout-root .detection-card,
html.dark .hud-app .shell-layout-root .records-card,
html.dark .hud-app .shell-layout-root .logs-card {
  background: color-mix(in srgb, var(--card-solid) 90%, var(--primary) 8%) !important;
  border-color: var(--border) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.38) !important;
}

/* 浅色：筛选条与深色模式现有规则互补 */
html:not(.dark) .hud-app .search-form {
  background: color-mix(in srgb, var(--card-solid) 93%, var(--primary) 6%) !important;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border)) !important;
  border-radius: var(--radius-lg) !important;
}

html:not(.dark) .hud-app .model-info-card,
html:not(.dark) .hud-app .detection-summary,
html:not(.dark) .hud-app .disease-detection-container .preview-container {
  background-color: color-mix(in srgb, var(--card-solid) 95%, var(--primary) 5%) !important;
  border: 1px solid var(--border) !important;
  color: var(--foreground);
}

html:not(.dark) .hud-app .model-info-card .info-value,
html:not(.dark) .hud-app .detection-summary .summary-value {
  color: var(--foreground);
}

html:not(.dark) .hud-app .media-preview-container {
  background-color: color-mix(in srgb, var(--card-solid) 96%, var(--primary) 3%) !important;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border)) !important;
}

/* 个人中心：与 HUD 主色统一（覆盖 scoped 灰蓝渐变与白盒） */
.hud-app .user-center-container {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--background) 94%, var(--primary) 6%),
    color-mix(in srgb, var(--card-solid) 90%, var(--primary) 10%)
  ) !important;
}

html.dark .hud-app .user-center-container {
  background: linear-gradient(
    165deg,
    var(--background) 0%,
    color-mix(in srgb, var(--card-solid) 82%, var(--primary) 18%) 100%
  ) !important;
}

html:not(.dark) .hud-app .user-center-container .profile-header,
html:not(.dark) .hud-app .user-center-container .profile-info,
html:not(.dark) .hud-app .user-center-container .user-actions,
html:not(.dark) .hud-app .user-center-container .loading-container {
  background: color-mix(in srgb, var(--card-solid) 96%, var(--primary) 4%) !important;
  border: 1px solid var(--border) !important;
  color: var(--foreground);
}

html.dark .hud-app .user-center-container .profile-header,
html.dark .hud-app .user-center-container .profile-info,
html.dark .hud-app .user-center-container .user-actions,
html.dark .hud-app .user-center-container .loading-container {
  background: color-mix(in srgb, var(--card-solid) 92%, transparent) !important;
  border: 1px solid var(--el-border-color) !important;
}

.hud-app .user-center-container .back-btn {
  background: linear-gradient(
    90deg,
    var(--primary),
    color-mix(in srgb, var(--primary) 72%, var(--accent) 28%)
  ) !important;
  border: none !important;
  color: #f8fafc !important;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 35%, transparent) !important;
}

.hud-app .user-center-container .back-btn:hover {
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 45%, transparent) !important;
}
