/* TXGUARD dynamic visual system
   用途：统一用户端、分析员台、管理员端、模型治理、发布中心与态势大屏的金融风控视觉语言。
   边界：只改变视觉表现与可访问性，不伪造业务指标、不注入方向二/三内容。
   失败策略：浏览器不支持特效时退化为静态深色玻璃拟态背景。 */
:root {
  --tx-bg-0: #020711;
  --tx-bg-1: #06101c;
  --tx-bg-2: #10213a;
  --tx-panel: rgba(11, 23, 40, .76);
  --tx-panel-strong: rgba(6, 14, 26, .9);
  --tx-line: rgba(216, 179, 101, .24);
  --tx-line-strong: rgba(216, 179, 101, .50);
  --tx-text: #f4ecd8;
  --tx-muted: #9fb0ba;
  --tx-cyan: #d8b365;
  --tx-blue: #7fc7d9;
  --tx-violet: #8fa6b2;
  --tx-orange: #f1d99b;
  --tx-red: #d45a4c;
  --tx-green: #74c69d;
  --tx-radius-xl: 24px;
  --tx-radius-lg: 18px;
  --tx-shadow: 0 26px 80px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.05);
  --tx-font: "STZhongsong", "华文中宋", "Songti SC", "SimSun", "宋体", serif;
}
html { background: var(--tx-bg-0); }
body {
  color: var(--tx-text);
  font-family: var(--tx-font);
  background:
    radial-gradient(circle at 18% 10%, rgba(216,179,101,.16), transparent 32vw),
    radial-gradient(circle at 84% 18%, rgba(127,199,217,.12), transparent 28vw),
    radial-gradient(circle at 64% 92%, rgba(216,179,101,.10), transparent 32vw),
    linear-gradient(135deg, var(--tx-bg-0) 0%, var(--tx-bg-1) 48%, #020711 100%) !important;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(216,179,101,.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(216,179,101,.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, transparent 0 30%, rgba(0,0,0,.30) 78%);
  background-size: 72px 72px, 72px 72px, 100% 100%;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.96), rgba(0,0,0,.35) 64%, rgba(0,0,0,.78));
  animation: txGridDrift 22s linear infinite;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 5px),
    linear-gradient(120deg, transparent, rgba(216,179,101,.05), transparent 62%);
  mix-blend-mode: screen;
  opacity: .42;
}
.tx-cyber-canvas { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: .95; }
.tx-cyber-orbit { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.tx-cyber-orbit::before,
.tx-cyber-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(127,199,217,.12);
  border-radius: 50%;
  filter: drop-shadow(0 0 22px rgba(61,242,255,.12));
  transform: rotateX(64deg) rotateZ(-12deg);
}
.tx-cyber-orbit::before { width: 78vw; height: 32vw; left: 11vw; top: 23vh; animation: txOrbitSpin 36s linear infinite; }
.tx-cyber-orbit::after { width: 48vw; height: 20vw; right: -8vw; top: 4vh; border-color: rgba(255,159,67,.18); animation: txOrbitSpin 28s linear reverse infinite; }
.tx-cyber-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at 50% 48%, transparent 0 42%, rgba(0,0,0,.36) 78%, rgba(0,0,0,.58)); }
body > main, .app-shell, .shell, .admin-shell, .auth-shell, .gov-shell, .release-shell { position: relative; z-index: 3; }
a, button { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease; }
a:hover, button:hover { transform: translateY(-1px); box-shadow: 0 0 22px rgba(216,179,101,.16); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--tx-cyan); outline-offset: 3px; }
.topbar, .admin-header, .release-header, header.top, .auth-shell .brand-panel, .gov-shell header, .shell header,
.metric-card, .panel, .card, .notice, .dialog, .filters, .timeline article, .queue, .workspace,
.release-shell article, .gov-shell article, .identity-grid article {
  border-color: var(--tx-line) !important;
  background:
    linear-gradient(145deg, rgba(13,31,70,.78), rgba(3,9,22,.72)) !important;
  box-shadow: var(--tx-shadow) !important;
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
}
.topbar, .admin-header, .release-header, header.top, .gov-shell header, .shell header {
  position: relative;
  overflow: hidden;
}
.topbar::before, .admin-header::before, .release-header::before, header.top::before, .gov-shell header::before, .shell header::before,
.panel::before, .card::before, .metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216,179,101,.95), rgba(127,199,217,.30), transparent);
  opacity: .75;
  pointer-events: none;
}
.panel, .card, .metric-card, .notice, .dialog { position: relative; overflow: hidden; }
.panel::after, .card::after, .metric-card::after {
  content: "";
  position: absolute;
  right: -28%; top: -34%;
  width: 70%; height: 80%;
  background: radial-gradient(circle, rgba(216,179,101,.08), transparent 62%);
  pointer-events: none;
}
.metric-card strong, .card strong, h1 em, .brand-title, .eyebrow, .micro, header p:first-child {
  text-shadow: 0 0 18px rgba(61,242,255,.26);
}
.metric-card strong, .card strong { color: var(--tx-text); }
.eyebrow, .micro, header p:first-child { color: var(--tx-cyan) !important; letter-spacing: .18em; }
table tr:hover td { background: rgba(61,242,255,.055); }
.risk-badge, .status-chip, .live-dot, .ok { filter: drop-shadow(0 0 10px rgba(216,179,101,.16)); }
input, select, textarea, pre {
  background: rgba(2, 11, 25, .58) !important;
  border-color: rgba(94,214,255,.22) !important;
  color: var(--tx-text) !important;
}
pre, code { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace; }
.tx-panel-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(216,179,101,.26);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--tx-cyan);
  background: rgba(216,179,101,.08);
}
.tx-hero-core {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(216,179,101,.26), rgba(216,179,101,.08) 42%, transparent 70%);
  box-shadow: 0 0 80px rgba(216,179,101,.20), inset 0 0 60px rgba(216,179,101,.16);
}
.tx-hero-core::before, .tx-hero-core::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; border: 1px dashed rgba(216,179,101,.34); animation: txOrbitSpin 16s linear infinite; }
.tx-hero-core::after { inset: 50px; border-color: rgba(127,199,217,.30); animation-direction: reverse; animation-duration: 11s; }
.tx-ai-toggle-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.tx-switch { position: relative; width: 58px; height: 32px; display: inline-block; }
.tx-switch input { opacity: 0; width: 0; height: 0; }
.tx-switch span { position: absolute; cursor: pointer; inset: 0; border-radius: 999px; background: rgba(255,77,109,.22); border: 1px solid rgba(255,77,109,.45); box-shadow: inset 0 0 18px rgba(0,0,0,.36); }
.tx-switch span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 16px rgba(255,255,255,.5); transition: transform .2s ease, background .2s ease; }
.tx-switch input:checked + span { background: rgba(216,179,101,.24); border-color: rgba(216,179,101,.62); }
.tx-switch input:checked + span::before { transform: translateX(26px); background: var(--tx-cyan); }
.tx-security-banner { border: 1px solid rgba(116,198,157,.28); background: rgba(116,198,157,.08); border-radius: 18px; padding: 14px 16px; color: #e7f7ee; }
@keyframes txGridDrift { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 72px 72px, 72px 72px, 0 0; } }
@keyframes txOrbitSpin { from { transform: rotateX(64deg) rotateZ(0deg); } to { transform: rotateX(64deg) rotateZ(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } .tx-cyber-canvas { display: none; } }
@media (max-width: 980px) { .tx-cyber-orbit::before { width: 120vw; height: 52vw; left: -10vw; } }
