/* ============================================================================
 * 字体声明已迁移到 public/css/fonts.css（真 woff2 文件，同域自托管）
 * ----------------------------------------------------------------------------
 * 🔴 这里原来有三条 @font-face，形如：
 *        @font-face { font-family:'Orbitron'; src: local('Orbitron'), local('Arial'); }
 *    `src: local()` 只查**访问者本机有没有装这个字体**，一个字节都不下载。
 *    结果是：机器上装着 Orbitron 的人才看得到科幻字形，其余人一律回退 Arial，
 *    所谓"六套皮肤用不同字体"在实际用户眼里从来没生效过。
 *
 *    更要命的是留着它会**反向干扰**：local() 声明没有 unicode-range、
 *    字重范围又写得宽（400 900），会和 fonts.css 里真字体的 latin 区间重叠，
 *    同一个 family 名下两条声明互相竞争，容易出现"明明有 woff2 却还是回退"。
 *
 *    所以这三条必须删干净，不给真字体留竞争对手。
 *    字体真身见 public/fonts/*.woff2（17 个，全 SIL OFL 1.1）。
 * ========================================================================== */

:root {
    --neon-green: #00ff9d;
    --neon-green-glow: rgba(0, 255, 157, 0.7);
    --neon-cyan: #00f5ff;
    --neon-cyan-glow: rgba(0, 245, 255, 0.7);
    --neon-purple: #a855f7;
    --neon-purple-glow: rgba(168, 85, 247, 0.7);
    --neon-pink: #ec4899;
    --neon-pink-glow: rgba(236, 72, 153, 0.7);
    --neon-red: #ff3366;
    --neon-red-glow: rgba(255, 51, 102, 0.7);
    --neon-orange: #ff9900;
    --neon-orange-glow: rgba(255, 153, 0, 0.7);
    --neon-yellow: #fbbf24;
    --neon-yellow-glow: rgba(251, 191, 36, 0.7);
    
    /* 2026-10-16 视觉精修：背景由纯黑 #000 改为分层深空navy黑 —— 纯黑扁平、廉价、
       低对比；以「变量承载渐变」的方式实现，仅影响 neon 皮肤，light/aurora/sunset
       在 theme.css 各自覆写 --dark-bg 为自身色调，多皮肤体系不变。 */
    --dark-bg: linear-gradient(180deg, #06080f 0%, #0a0e1a 55%, #070a13 100%);
    --dark-surface: rgba(10, 14, 26, 0.95);
    --dark-card: rgba(15, 20, 36, 0.72);
    --dark-card-hover: rgba(22, 28, 48, 0.90);
    
    /* 边框：细分隔线改为中性冷灰（原霓虹绿描边是「黑客风」廉价感的主要来源），
       仅保留 --border-glow 作为强调/焦点用的品牌色描边。 */
    --border-glow: rgba(0, 255, 157, 0.42);
    --border-subtle: rgba(130, 150, 190, 0.16);

    --text-primary: #ffffff;
    /* 2026-10-16：副文本/弱文本提亮，保证深色底上舒适可读（原 .75 / .40 过暗） */
    --text-secondary: rgba(255, 255, 255, 0.86);
    --text-muted: rgba(255, 255, 255, 0.52);
    
    --glass-blur: 20px;
    --glass-opacity: 0.15;
    
    --gradient-primary: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
    --gradient-danger: linear-gradient(135deg, var(--neon-red), #cc0055);
    --gradient-warning: linear-gradient(135deg, var(--neon-yellow), var(--neon-orange));
    --gradient-info: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    background: var(--dark-bg);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 10%, rgba(0, 255, 157, 0.05) 0%, transparent 42%),
        radial-gradient(ellipse at 80% 90%, rgba(0, 245, 255, 0.035) 0%, transparent 42%),
        radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 157, 0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 157, 0.012) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
    animation: subtleGridMove 60s linear infinite;
}

@keyframes subtleGridMove {
    0% { background-position: 0 0; }
    100% { background-position: 80px 80px; }
}

/* 同 main：取消 1600px 上限，让仪表盘/日志/访问统计这类数据页吃满可用宽度 */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 25px;
}

header {
    position: relative;
    z-index: 100;
    /* 顶条背景改由皮肤变量 --header-bg 驱动（随皮肤联动）；分隔线降为中性细边，
       大范围霓虹阴影换成轻微中性投影，避免「贴片式发光条」。 */
    background: var(--header-bg, rgba(8, 12, 22, 0.85));
    border-bottom: 1px solid var(--border-subtle);
    padding: 0;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 25px;
    border-bottom: 1px solid var(--border-subtle);
}

/* 2026-10-14 顶栏统一化：左组(logo+时间块)居左，右组(用户+选择器)推最右 */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 25px;
    overflow-x: auto;
    white-space: nowrap;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 25px var(--neon-green-glow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 0 40px var(--neon-green-glow);
}

.logo-icon:hover::before {
    opacity: 0.5;
}

/* ============================================================================
 * 品牌字（左上角）—— 2026-10-15 可读性修复
 * ----------------------------------------------------------------------------
 * 原实现三个问题叠在一起，导致「巡影织网」四个字发虚、看不清（用户实测反馈）：
 *   ① font-family:'Orbitron' 是**纯拉丁**字体，中文全部回退到系统 sans，
 *      再套 font-weight:900 → 回退字体做「伪加粗」，笔画糊成一团；
 *   ② letter-spacing:5px 是按拉丁词设计的，套在中文上字距被撑得稀烂；
 *   ③ -webkit-text-fill-color:transparent + background-clip:text 的渐变文字，
 *      浅色主题下是「天蓝→青」低对比渐变，19px 的中文字形基本看不出来。
 *
 * 现在分开处理，两段各司其职：
 *   · 中文主字「巡影织网」→ 高对比**实色**，跟随主题 --text-primary
 *     （暗色主题 #ffffff / 浅色主题 #0f172a，两种背景都清晰）
 *   · 拉丁副标 → 保留渐变 + Orbitron + 大字距，它本来就是装饰层
 * 中文字重从 900 降到 700：系统字体在 700 已有真实字重，不再伪加粗。
 * ========================================================================== */
.site-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 "Source Han Sans SC", "Noto Sans CJK SC", "Heiti SC", sans-serif;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 2px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.site-title-latin {
    display: block;
    margin-top: 3px;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 顶栏品牌图标：由 emoji 🔒 换成与登录页同款的 SVG 盾形扫描标，
 * 消除「廉价感」；SVG 尺寸按 .logo-icon 的 45px 容器等比收缩。 */
.logo-icon .xy-brand-mark {
    width: 27px;
    height: 27px;
    display: block;
    position: relative;
    z-index: 1;
}

.header-time {
    padding: 10px 22px;
    background: rgba(0, 255, 157, 0.05);
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    text-align: center;
}

.header-time:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.15);
}

.date-display {
    font-family: var(--font-mono);
    font-size: 15px;
    color: var(--text-secondary);
    letter-spacing: 3px;
}

.time-display {
    font-family: var(--font-mono);
    font-size: 18px;
    color: var(--neon-green);
    letter-spacing: 5px;
    margin-top: 4px;
    text-shadow: 0 0 20px var(--neon-green-glow);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 20px;
    background: rgba(0, 255, 157, 0.08);
    border-radius: 25px;
    border: 1px solid var(--border-glow);
    transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.user-info:hover {
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.2);
}

.user-id {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--neon-green);
    font-weight: 700;
    letter-spacing: 2px;
}

.user-name {
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--neon-green);
    font-size: 22px;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-toggle:hover {
    color: var(--neon-cyan);
    transform: scale(1.1);
}

nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item {
    position: relative;
    padding: 11px 22px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    transition: color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
    letter-spacing: 1.5px;
    font-family: var(--font-ui);
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.1) 0%, rgba(0, 245, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nav-item:hover {
    color: var(--neon-green);
    background: rgba(0, 255, 157, 0.12);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.15);
    transform: translateY(-3px);
}

.nav-item:hover::before {
    opacity: 1;
}

.nav-item.active {
    color: var(--neon-green);
    background: rgba(0, 255, 157, 0.18);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.25);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: var(--gradient-primary);
    box-shadow: 0 0 15px var(--neon-green-glow);
    border-radius: 2px;
    animation: activeLineGrow 0.4s ease;
}

@keyframes activeLineGrow {
    from { width: 0; }
    to { width: 40%; }
}

.nav-item.logout {
    color: var(--neon-red);
    margin-left: 10px;
}

.nav-item.logout:hover {
    background: rgba(255, 51, 102, 0.12);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.2);
}

/* 🔴 2026-10-15：取消 max-width 上限（原来 1600px）
 * 原因：main 与 .container 各有一道 max-width:1600px + margin:auto，
 * 在 1920 宽屏上（侧栏 248px 后可用约 1672px）内容被夹到 1600px 再叠加两处
 * padding:25px → 实际内容宽只剩约 1550px，中间有价值组件被"两侧大留白 + 内容居中"
 * 双重夹窄，视觉上像是布局坏了。
 * 现在改为吃满 .app-main 的可用宽度；超宽屏的可读性由 minmax() 栅格与
 * 表格 min-width 自身兜底（宽了就多排几列，而不是把单列压窄）。
 * 如需给纯文本长页（服务协议等）保留可读上限，请用 .t-wrap 之类的局部容器，
 * 不要在 main/.container 全局设死。 */
main {
    position: relative;
    z-index: 10;
    width: 100%;
    margin: 0 auto;
    padding: 32px 25px 40px;
}

.page-header {
    margin-bottom: 28px;   /* 2026-10-15：原 55px，配合 main 的 padding 40px 会让标题下方出现大片空白 */
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, var(--border-glow), transparent);
    opacity: 0.3;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: 6px;
    position: relative;
    animation: titleFadeIn 0.6s ease;
}

@keyframes titleFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 160px;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: 3px;
    box-shadow: 0 0 20px var(--neon-green-glow);
}

.page-header p {
    font-size: 17px;
    color: var(--text-muted);
    margin-top: 25px;
    letter-spacing: 2px;
    font-weight: 400;
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    border-radius: 20px;
    margin-top: 15px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--neon-red);
    letter-spacing: 3px;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 51, 102, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 51, 102, 0.6); }
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-red);
    border-radius: 50%;
    animation: dotPulse 1s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.page-title {
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
    letter-spacing: 8px;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 140px;
    height: 5px;
    background: var(--gradient-primary);
}

.page-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 22px;   /* 2026-10-15：原 55px —— 这是"标题下方大片空白"的直接来源 */
    font-weight: 400;
    letter-spacing: 2px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 32px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 255, 157, 0.12);
    border-color: var(--border-glow);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 22px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--border-glow);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.4);
}

.card-icon.attack { background: rgba(255, 51, 102, 0.08); border-color: rgba(255, 51, 102, 0.4); }
.card-icon.warning { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.4); }
.card-icon.info { background: rgba(0, 245, 255, 0.08); border-color: rgba(0, 245, 255, 0.4); }
.card-icon.purple { background: rgba(168, 85, 247, 0.08); border-color: rgba(168, 85, 247, 0.4); }

.card-value {
    font-family: var(--font-mono);
    font-size: 58px;
    font-weight: 700;
    color: var(--neon-green);
    margin-bottom: 14px;
    line-height: 1;
    text-shadow: 0 0 30px var(--neon-green-glow);
    transition: text-shadow 0.4s ease, transform 0.4s ease, color 0.4s ease;
}

.card:hover .card-value {
    text-shadow: 0 0 50px var(--neon-green-glow);
    transform: scale(1.05);
}

.card-label {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 22px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 255, 157, 0.15);
    border-color: var(--border-glow);
}

.stat-card.danger {
    border-color: rgba(255, 51, 102, 0.3);
}

.stat-card.danger::before {
    background: var(--gradient-danger);
}

.stat-card.warning {
    border-color: rgba(251, 191, 36, 0.3);
}

.stat-card.warning::before {
    background: var(--gradient-warning);
}

.stat-card.info {
    border-color: rgba(0, 245, 255, 0.3);
}

.stat-card.info::before {
    background: var(--gradient-info);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--border-glow);
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover .stat-icon {
    transform: scale(1.2) rotate(8deg);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.5);
}

.stat-card.danger .stat-icon {
    background: rgba(255, 51, 102, 0.1);
    border-color: rgba(255, 51, 102, 0.5);
}

.stat-card.warning .stat-icon {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.5);
}

.stat-card.info .stat-icon {
    background: rgba(0, 245, 255, 0.1);
    border-color: rgba(0, 245, 255, 0.5);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 52px;
    font-weight: 700;
    color: var(--neon-green);
    line-height: 1;
    text-shadow: 0 0 30px var(--neon-green-glow);
    display: block;
    margin-bottom: 10px;
    transition: text-shadow 0.4s ease, color 0.4s ease, transform 0.4s ease;
}

.stat-card:hover .stat-value {
    text-shadow: 0 0 50px var(--neon-green-glow);
}

.stat-card.danger .stat-value {
    color: var(--neon-red);
    text-shadow: 0 0 30px var(--neon-red-glow);
}

.stat-card.warning .stat-value {
    color: var(--neon-yellow);
    text-shadow: 0 0 30px var(--neon-yellow-glow);
}

.stat-card.info .stat-value {
    color: var(--neon-cyan);
    text-shadow: 0 0 30px var(--neon-cyan-glow);
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
}

.stat-trend {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 10px;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.stat-trend.up {
    background: rgba(0, 255, 157, 0.1);
    color: var(--neon-green);
}

.stat-trend.down {
    background: rgba(255, 51, 102, 0.1);
    color: var(--neon-red);
}

.row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    margin-bottom: 35px;
}

.row .card {
    padding: 35px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.card-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 3px;
}

.view-all {
    font-size: 13px;
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1.5px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all:hover {
    color: var(--neon-green);
    transform: translateX(5px);
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-subtle);
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    text-decoration: none;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn:hover {
    border-color: var(--border-glow);
    background: rgba(0, 255, 157, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 255, 157, 0.1);
}

.action-btn.danger {
    border-color: rgba(255, 51, 102, 0.3);
}

.action-btn.danger:hover {
    border-color: var(--neon-red);
    background: rgba(255, 51, 102, 0.08);
}

.action-btn.warning {
    border-color: rgba(251, 191, 36, 0.3);
}

.action-btn.warning:hover {
    border-color: var(--neon-yellow);
    background: rgba(251, 191, 36, 0.08);
}

.action-icon {
    font-size: 24px;
}

.action-text {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 700;
    letter-spacing: 2px;
}

.section-card {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 28px;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.section-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.section-card:hover::after {
    opacity: 1;
}

.section-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 15px 40px rgba(0, 255, 157, 0.08);
}

.section-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--neon-green);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--neon-green);
    box-shadow: 0 0 15px var(--neon-green-glow);
    border-radius: 2px;
}

.filter-bar {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.filter-bar:hover {
    border-color: var(--border-glow);
    box-shadow: 0 10px 25px rgba(0, 255, 157, 0.08);
}

.filter-select {
    padding: 14px 24px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    min-width: 180px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    font-family: var(--font-ui);
    letter-spacing: 1px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--border-glow);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.filter-input {
    flex: 1;
    padding: 14px 22px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    font-family: var(--font-ui);
}

.filter-input:focus {
    outline: none;
    border-color: var(--border-glow);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.filter-btn {
    padding: 14px 30px;
    font-size: 14px;
    font-weight: 700;
}

.filter-reset {
    padding: 14px 25px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    font-family: var(--font-ui);
    letter-spacing: 2px;
}

.filter-reset:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-glow);
}

.table-container {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
}

/* 🔴 2026-10-15：裸 <table>（页面里直接写 <table> 而不加 .data-table 的那些）
 * 在此前**没有任何宽度规则** → 浏览器按内容自动布局，表格只占内容所需宽度，
 * 宽屏上右侧留下大片空白，看起来像"内容被压缩"。
 * 之前修的是 main/.container 的 max-width（外层空间），
 * 但表格自身不撑满 → 外层放开后空白只是从"容器"挪到了"表格右侧"，视觉问题依旧。
 * 这里补一条全局规则：表格默认撑满所在容器，min-width 保证窄屏可横向滚动。
 * 已带 class 的表格（.data-table / .xy-table / .sessions-table）不受影响，
 * 因为它们的 class 选择器优先级高于此处的元素选择器。 */
table {
    width: 100%;
    border-collapse: collapse;
}
.table-container > table { min-width: 720px; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 20px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--border-glow);
    font-weight: 700;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.data-table th::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--neon-green);
    transition: width 0.4s ease;
}

.data-table th:hover::after {
    width: 100%;
}

.data-table td {
    padding: 18px 20px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    transition: color 0.3s ease, background-color 0.3s ease;
}

.data-table tr:hover td {
    color: var(--neon-green);
    background: rgba(0, 255, 157, 0.04);
}

.log-level {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.log-level.attack { background: rgba(255, 51, 102, 0.15); color: var(--neon-red); }
.log-level.warning { background: rgba(251, 191, 36, 0.15); color: var(--neon-yellow); }
.log-level.info { background: rgba(0, 245, 255, 0.15); color: var(--neon-cyan); }
.log-level.success { background: rgba(0, 255, 136, 0.15); color: var(--neon-green); }
.log-level.purple { background: rgba(168, 85, 247, 0.15); color: var(--neon-purple); }

.tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.tag.danger {
    background: rgba(255, 51, 102, 0.15);
    color: var(--neon-red);
}

.tag.warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--neon-yellow);
}

.tag.success {
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon-green);
}

.tag.info {
    background: rgba(0, 245, 255, 0.15);
    color: var(--neon-cyan);
}

.ip-link {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    font-family: var(--font-mono);
    letter-spacing: 1px;
}

.ip-link:hover {
    color: var(--neon-green);
    text-decoration: underline;
    text-shadow: 0 0 10px var(--neon-green-glow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 35px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: var(--font-ui);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transition: width 0.8s ease, height 0.8s ease;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #000;
    box-shadow: 0 8px 30px rgba(0, 255, 157, 0.5);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 255, 157, 0.7);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 8px 30px rgba(255, 51, 102, 0.5);
}

.btn-danger:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(255, 51, 102, 0.7);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-glow);
    color: var(--neon-green);
}

.btn-outline:hover {
    background: rgba(0, 255, 157, 0.1);
    border-color: var(--neon-green);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.4);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 12px;
    border-radius: 8px;
    letter-spacing: 2px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-glow);
}

.form-group {
    margin-bottom: 28px;
    position: relative;
}

.form-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.form-group:focus-within::before {
    opacity: 1;
    animation: formGlow 0.4s ease;
}

@keyframes formGlow {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.form-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.form-group:focus-within .form-label {
    color: var(--neon-green);
    letter-spacing: 4px;
}

.form-input {
    width: 100%;
    padding: 16px 22px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-ui);
    position: relative;
    z-index: 1;
}

.form-input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.3);
    transform: translateY(-3px);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-select {
    background-color: var(--input-bg);
    cursor: pointer;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 30px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 28px;
}

.chart-card {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 30px;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.chart-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 15px 40px rgba(0, 255, 157, 0.12);
    transform: translateY(-4px);
}

.chart-card h3 {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--neon-green);
    margin-bottom: 25px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.chart-card.full-width {
    grid-column: span 2;
}

.chart-card canvas {
    height: 280px !important;
}

.heatmap-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-x: auto;
    padding: 20px 0;
}

.heatmap-row {
    display: grid;
    grid-template-columns: 60px repeat(24, 40px);
    gap: 6px;
    align-items: center;
}

.heatmap-label {
    font-size: 13px;
    color: var(--text-muted);
    text-align: right;
    font-weight: 600;
    font-family: var(--font-ui);
}

.heatmap-cell {
    height: 32px;
    border-radius: 6px;
    transition: border-color 0.3s ease, transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0, 255, 157, 0.15);
    position: relative;
}

.heatmap-cell:hover {
    border-color: var(--neon-green);
    transform: scale(1.15);
    z-index: 10;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    width: fit-content;
}

.heatmap-legend span {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.heatmap-color-0 { background: rgba(0, 255, 157, 0.08); }
.heatmap-color-1 { background: rgba(0, 255, 157, 0.25); }
.heatmap-color-2 { background: rgba(0, 255, 157, 0.45); }
.heatmap-color-3 { background: rgba(0, 255, 157, 0.65); }
.heatmap-color-4 { background: rgba(0, 255, 157, 0.85); }
.heatmap-color-5 { background: var(--neon-green); box-shadow: 0 0 25px var(--neon-green-glow); border-color: var(--neon-green); }

.heatmap-hours {
    display: grid;
    grid-template-columns: 60px repeat(24, 40px);
    gap: 6px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.heatmap-hour-label {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    font-family: var(--font-mono);
    padding-top: 8px;
}

.heatmap-tooltip {
    position: fixed;
    background: rgba(10, 10, 25, 0.98);
    border: 1px solid var(--border-glow);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 255, 157, 0.3);
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.analysis-card {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 25px;
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.analysis-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px 0 0 20px;
}

.analysis-card:hover::after {
    opacity: 1;
}

.analysis-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 15px 40px rgba(0, 255, 157, 0.1);
    transform: translateX(5px);
}

.analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.analysis-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.analysis-card:hover .analysis-icon-wrap {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.analysis-icon {
    font-size: 24px;
    color: var(--neon-green);
}

.analysis-title-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analysis-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.analysis-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.analysis-toggle {
    width: 52px;
    height: 28px;
    background: rgba(0, 255, 157, 0.1);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-glow);
}

.analysis-toggle.active {
    background: var(--gradient-primary);
    box-shadow: 0 0 25px var(--neon-green-glow);
}

.analysis-toggle::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.analysis-toggle.active::after {
    left: 28px;
}

.risk-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-right: 12px;
}

.risk-badge.high {
    background: rgba(255, 51, 102, 0.2);
    color: var(--neon-red);
    border: 1px solid rgba(255, 51, 102, 0.4);
}

.risk-badge.medium {
    background: rgba(251, 191, 36, 0.2);
    color: var(--neon-yellow);
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.risk-badge.low {
    background: rgba(0, 255, 157, 0.2);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 157, 0.4);
}

.risk-badge.info {
    background: rgba(0, 245, 255, 0.2);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 245, 255, 0.4);
}

.analysis-summary {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 72px;
}

.analysis-detail {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-subtle);
    display: none;
}

.analysis-detail.show {
    display: block;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    padding-left: 72px;
}

.analysis-stat {
    text-align: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.analysis-stat:hover {
    border-color: var(--border-glow);
    background: rgba(0, 255, 157, 0.05);
    transform: translateY(-5px);
}

.analysis-stat-value {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 700;
    color: var(--neon-green);
    display: block;
    margin-bottom: 10px;
    text-shadow: 0 0 25px var(--neon-green-glow);
}

.analysis-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
}

.analysis-list {
    padding-left: 72px;
}

.analysis-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border-left: 4px solid var(--border-glow);
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.analysis-list-item:hover {
    background: rgba(0, 255, 157, 0.05);
    border-left-color: var(--neon-green);
    transform: translateX(8px);
}

.analysis-list-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.analysis-list-value {
    font-size: 14px;
    color: var(--neon-cyan);
    font-weight: 700;
}

.analysis-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
    font-size: 15px;
}

.analysis-empty i {
    color: var(--neon-green);
    font-size: 24px;
}

.file-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.file-status.ok { background: rgba(0, 255, 157, 0.15); color: var(--neon-green); }
.file-status.changed { background: rgba(251, 191, 36, 0.15); color: var(--neon-yellow); }
.file-status.new { background: rgba(0, 245, 255, 0.15); color: var(--neon-cyan); }

.empty-state {
    text-align: center;
    padding: 50px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.rank-tag {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
}

.rank-tag.top {
    background: var(--gradient-warning);
    color: #000;
    box-shadow: 0 0 15px var(--neon-yellow-glow);
}

.user-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 240, 255, 0.15);
    color: var(--neon-cyan);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.time-range-info {
    padding: 25px;
}

.time-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.time-item:last-child {
    border-bottom: none;
}

.time-label {
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.time-value {
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 15px;
}

.action-suggestions {
    padding: 20px;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggestion:last-child {
    margin-bottom: 0;
}

.suggestion:hover {
    transform: translateY(-4px);
}

.suggestion.warning {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    color: var(--text-secondary);
}

.suggestion.info {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--text-secondary);
}

.suggestion.success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--text-secondary);
}

.suggestion i {
    font-size: 22px;
}

.suggestion span {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.suggestion .btn {
    flex-shrink: 0;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 30px;
    position: relative;
    z-index: 1;
}

.login-bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: 
        radial-gradient(ellipse at center, rgba(0, 255, 157, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse at top right, rgba(0, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(147, 51, 234, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(236, 72, 153, 0.05) 0%, transparent 40%);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.login-bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.04;
    background-image: 
        linear-gradient(rgba(0, 255, 157, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 157, 0.6) 1px, transparent 1px);
    background-size: 70px 70px;
    animation: gridMove 25s linear infinite;
}

@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 70px 70px; }
}

.login-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.login-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-green);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.6; }
    25% { transform: translateY(-30px) translateX(20px); opacity: 0.8; }
    50% { transform: translateY(-60px) translateX(40px); opacity: 0.3; }
    75% { transform: translateY(-30px) translateX(20px); opacity: 0.8; }
}

.login-box {
    background: rgba(8, 8, 20, 0.98);
    border: 1px solid var(--border-glow);
    border-radius: 24px;
    padding: 80px 60px;
    width: 100%;
    max-width: 560px;
    box-shadow: 
        0 0 60px rgba(0, 255, 157, 0.15),
        0 0 120px rgba(0, 255, 157, 0.05);
    text-align: center;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 255, 157, 0.03), 
        transparent);
    animation: loginShimmer 3s ease-in-out infinite;
}

@keyframes loginShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.login-box::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--neon-green), var(--neon-cyan), var(--neon-green), transparent);
    border-radius: 0 0 20px 20px;
    filter: blur(8px);
    opacity: 0.5;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.login-header {
    position: relative;
    margin-bottom: 45px;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    border-radius: 2px;
}

.login-logo {
    position: relative;
    margin-bottom: 25px;
}

.login-logo-icon {
    width: 90px;
    height: 90px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto;
    box-shadow: 0 0 30px var(--neon-green-glow);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.login-logo-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, var(--neon-green-glow) 0%, transparent 70%);
    opacity: 0.4;
    border-radius: 20px;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

.login-header h1 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 8px;
    text-transform: uppercase;
}

.login-subtitle {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

/* 🔴 2026-10-15 清理：.login-user-info / .login-user-id / .login-user-name 三组选择器已无任何
 * HTML 使用点（去测试化后学号/姓名块整体移除，全仓 grep 仅剩本定义），属死规则，删除。 */

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 28px;
}

.login-form .form-group label {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 12px;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.login-form .form-group:focus-within label {
    color: var(--neon-green);
    letter-spacing: 5px;
}

.login-form .form-input {
    width: 100%;
    padding: 18px 24px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-ui);
    transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.login-form .form-input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.3);
    transform: translateY(-3px);
}

.login-form .form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.login-form .btn-login {
    width: 100%;
    padding: 18px;
    font-size: 15px;
    letter-spacing: 6px;
    margin-top: 15px;
}

.login-tips {
    margin-top: 28px;
    padding: 20px 25px;
    background: rgba(0, 245, 255, 0.06);
    border: 1px solid rgba(0, 245, 255, 0.15);
    border-radius: 12px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.login-tips:hover {
    border-color: rgba(0, 245, 255, 0.4);
    background: rgba(0, 245, 255, 0.08);
}

.login-tips p {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    letter-spacing: 1px;
}

.login-tips code {
    font-family: var(--font-mono);
    color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    margin: 0 5px;
}

.login-footer {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--border-subtle);
    position: relative;
}

.login-footer::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
    border-radius: 1px;
}

.login-footer p {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.login-status-bar {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 20px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-status-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--neon-green-glow);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--neon-green-glow); }
    50% { opacity: 0.5; transform: scale(0.8); box-shadow: 0 0 5px var(--neon-green-glow); }
}

.login-status-text {
    font-size: 11px;
    color: var(--neon-green);
    letter-spacing: 2px;
    font-family: var(--font-mono);
}

.login-decor-left,
.login-decor-right {
    position: absolute;
    top: 50%;
    width: 60px;
    height: 200px;
    border-radius: 30px;
    filter: blur(30px);
    opacity: 0.15;
    animation: decorPulse 4s ease-in-out infinite;
}

.login-decor-left {
    left: -80px;
    transform: translateY(-50%);
    background: linear-gradient(180deg, var(--neon-green), transparent);
}

.login-decor-right {
    right: -80px;
    transform: translateY(-50%);
    background: linear-gradient(180deg, var(--neon-cyan), transparent);
    animation-delay: 2s;
}

@keyframes decorPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

.alert-box {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    animation: alertFadeIn 0.4s ease;
}

@keyframes alertFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.4);
    color: var(--neon-red);
}

.alert-success {
    background: rgba(0, 255, 157, 0.15);
    border: 1px solid rgba(0, 255, 157, 0.4);
    color: var(--neon-green);
}

.error-message {
    padding: 16px 22px;
    background: rgba(255, 51, 102, 0.15);
    border: 1px solid rgba(255, 51, 102, 0.4);
    border-radius: 12px;
    color: var(--neon-red);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 25px;
    animation: alertFadeIn 0.4s ease;
}

.success-message {
    padding: 16px 22px;
    background: rgba(0, 255, 157, 0.15);
    border: 1px solid rgba(0, 255, 157, 0.4);
    border-radius: 12px;
    color: var(--neon-green);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 25px;
    animation: alertFadeIn 0.4s ease;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.space-y-2 > * + * {
    margin-top: 8px;
}

.space-y-3 > * + * {
    margin-top: 12px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 22px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border-left: 4px solid var(--border-glow);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.file-item:hover {
    background: rgba(0, 255, 157, 0.05);
    transform: translateX(5px);
}

.file-item.changed {
    border-left-color: var(--neon-red);
    background: rgba(255, 51, 102, 0.05);
}

.file-item.new {
    border-left-color: var(--neon-yellow);
    background: rgba(251, 191, 36, 0.05);
}

.file-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-family: var(--font-mono);
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--border-glow);
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-info h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.file-status {
    flex-shrink: 0;
}

.file-status span {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.file-status span.danger {
    background: rgba(255, 51, 102, 0.15);
    color: var(--neon-red);
}

.file-status span.warning {
    background: rgba(251, 191, 36, 0.15);
    color: var(--neon-yellow);
}

.file-status span.success {
    background: rgba(0, 255, 157, 0.15);
    color: var(--neon-green);
}

.grid {
    display: grid;
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gap-4 {
    gap: 16px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    /* 🔴 2026-10-15 修复：原为 rgba(0,0,0,.2) 深色硬编码，浅色皮肤下变成
       「深色块压在浅色页面上」，且与卡片背景分层混乱。改用语义变量。 */
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    border-left: 4px solid var(--neon-red);
    margin-bottom: 12px;
    transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.alert-item:hover {
    background: rgba(255, 51, 102, 0.05);
    transform: translateX(5px);
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content h4 {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.alert-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.alert-time {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

footer {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 50px;
    background: rgba(2, 2, 5, 0.5);
}

footer p {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.btn-small {
    padding: 6px 16px;
    font-size: 11px;
    letter-spacing: 2px;
}

.font-mono {
    font-family: var(--font-mono);
}

.text-sm {
    font-size: 12px;
}

@media (max-width: 768px) {
    .login-box {
        padding: 50px 30px;
        margin: 20px;
    }
    
    .login-header h1 {
        font-size: 26px;
        letter-spacing: 4px;
    }
    
    .login-logo-icon {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .row {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card.full-width {
        grid-column: span 1;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-bottom {
        justify-content: flex-start;
    }
    
    nav {
        gap: 0;
    }
    
    .nav-item {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .page-header h1 {
        font-size: 32px;
        letter-spacing: 4px;
    }
    
    .heatmap-row {
        grid-template-columns: 40px repeat(24, 25px);
    }
    
    .heatmap-hours {
        grid-template-columns: 40px repeat(24, 25px);
    }
    
    .heatmap-cell {
        height: 22px;
    }
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(0, 255, 157, 0.05);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 16px 20px;
    text-align: left;
    border-bottom: 2px solid var(--border-glow);
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: rgba(0, 255, 157, 0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.alert-list {
    padding: 5px;
}

.alert-item.danger {
    border-left-color: var(--neon-red);
}

.alert-item.warning {
    border-left-color: var(--neon-yellow);
    background: rgba(251, 191, 36, 0.03);
}

.alert-item.warning:hover {
    background: rgba(251, 191, 36, 0.08);
}

.file-list {
    padding: 5px;
}

.time-range-info {
    padding: 20px;
}

.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.time-item:last-child {
    border-bottom: none;
}

.time-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.time-value {
    font-size: 14px;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-weight: 700;
}

.action-suggestions {
    padding: 20px;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.suggestion:last-child {
    margin-bottom: 0;
}

.suggestion.warning {
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
}

.suggestion.info {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.suggestion.success {
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.suggestion i {
    font-size: 24px;
    flex-shrink: 0;
}

.suggestion span {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.analysis-card {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.analysis-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 4px 25px rgba(0, 255, 157, 0.08);
}

.analysis-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.2);
}

.analysis-icon-wrap {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    flex-shrink: 0;
}

.analysis-icon {
    font-size: 20px;
}

.analysis-title-wrap {
    flex: 1;
}

.analysis-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.analysis-subtitle {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.analysis-toggle {
    width: 40px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.analysis-toggle::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: left 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.analysis-toggle.active {
    background: var(--neon-green);
}

.analysis-toggle.active::before {
    left: 20px;
    background: #000;
}

.analysis-summary {
    padding: 16px 24px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-bottom: 1px solid var(--border-subtle);
}

.risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-right: 10px;
}

.risk-badge.high {
    background: rgba(255, 51, 102, 0.15);
    color: var(--neon-red);
}

.risk-badge.medium {
    background: rgba(251, 191, 36, 0.15);
    color: var(--neon-yellow);
}

.risk-badge.low {
    background: rgba(0, 255, 157, 0.15);
    color: var(--neon-green);
}

.risk-badge.info {
    background: rgba(0, 245, 255, 0.15);
    color: var(--neon-cyan);
}

.analysis-detail {
    display: none;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.1);
}

.analysis-detail.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.analysis-stat {
    text-align: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.analysis-stat-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--neon-green);
    font-family: var(--font-mono);
    margin-bottom: 5px;
}

.analysis-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.analysis-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.analysis-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.analysis-list-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.analysis-list-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
}

.analysis-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px;
    text-align: center;
}

.analysis-empty div {
    font-size: 40px;
}

.analysis-empty span {
    font-size: 14px;
    color: var(--text-muted);
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: 25px;
    margin-bottom: 30px;
    font-size: 12px;
    color: var(--neon-green);
    font-family: var(--font-mono);
    letter-spacing: 3px;
    animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--neon-green-glow);
}

.stat-arrow {
    font-size: 24px;
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
    margin-left: auto;
}

.stat-card:hover .stat-arrow {
    color: var(--neon-green);
    transform: translateX(5px);
}

.status-panel {
    padding: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: padding-left 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item:hover {
    padding-left: 10px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.success {
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green-glow);
}

.status-dot.warning {
    background: var(--neon-yellow);
    box-shadow: 0 0 8px var(--neon-yellow-glow);
}

.status-dot.danger {
    background: var(--neon-red);
    box-shadow: 0 0 8px var(--neon-red-glow);
}

.status-item span:first-of-type {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
}

.status-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-green);
    font-family: var(--font-mono);
}

.event-list {
    padding: 15px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.event-item:last-child {
    border-bottom: none;
}

.event-type {
    font-size: 12px;
    color: var(--text-secondary);
    width: 80px;
    flex-shrink: 0;
}

.event-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.event-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.8s ease;
}

.event-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    width: 40px;
    text-align: right;
}

.ip-list {
    padding: 15px;
}

.ip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.ip-item:last-child {
    margin-bottom: 0;
}

.ip-item:hover {
    background: rgba(0, 255, 157, 0.05);
    transform: translateX(5px);
}

.ip-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--neon-green);
    font-family: var(--font-mono);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    padding: 20px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.action-btn:hover {
    border-color: var(--border-glow);
    background: rgba(0, 255, 157, 0.05);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 157, 0.15);
}

.action-btn.danger:hover {
    border-color: var(--neon-red);
    background: rgba(255, 51, 102, 0.05);
    box-shadow: 0 10px 30px rgba(255, 51, 102, 0.15);
}

.action-btn.warning:hover {
    border-color: var(--neon-yellow);
    background: rgba(251, 191, 36, 0.05);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.15);
}

.action-btn.info:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 245, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.15);
}

.action-btn.success:hover {
    border-color: var(--neon-green);
    background: rgba(0, 255, 157, 0.05);
}

.action-icon {
    font-size: 32px;
}

.action-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .login-box {
        padding: 50px 30px;
        margin: 20px;
    }
    
    .login-header h1 {
        font-size: 26px;
        letter-spacing: 4px;
    }
    
    .login-logo-icon {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .row {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card.full-width {
        grid-column: span 1;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-bottom {
        justify-content: flex-start;
    }
    
    nav {
        gap: 0;
    }
    
    .nav-item {
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .page-header h1 {
        font-size: 32px;
        letter-spacing: 4px;
    }
    
    .heatmap-row {
        grid-template-columns: 40px repeat(24, 25px);
    }
    
    .heatmap-hours {
        grid-template-columns: 40px repeat(24, 25px);
    }
    
    .heatmap-cell {
        height: 22px;
    }
    
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-value {
        font-size: 42px;
    }
    
    .login-box {
        padding: 40px 20px;
    }
    
    .login-header h1 {
        font-size: 22px;
        letter-spacing: 3px;
    }

    .login-status-bar {
        position: static;
        margin-bottom: 20px;
        justify-content: center;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}

/* === P1 侧栏+顶条视觉重构 (2026-10-14) === */
/* 设计 token（沿用 :root 既有 --neon-* / --dark-* 变量，仅补充间距/圆角/阴影/侧栏宽） */
:root {
    --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
    --space-5: 24px; --space-6: 32px;
    --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
    /* 2026-11-11 P2-Q25：248 → 228（收窄 20px）。P2 改 6 组后组头最长 6 字
       （"报告与自动化"），228 - 左右 padding 32 = 196px，6 字×15px ≈ 90px，
       加项数徽标与 caret 仍在同一行不换行。省下的 20px 全给内容区。 */
    --sidebar-w: 228px;
    --sidebar-w-mini: 64px;   /* 折叠态图标条宽度：容纳 20px 图标 + 左右各 10px 内边距 + 边框 */
}

/* —— 整体外壳：左侧固定侧栏 + 右侧自适应主区 —— */
.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
    background: linear-gradient(180deg, rgba(8, 8, 18, 0.98), rgba(12, 12, 28, 0.96));
    border-right: 1px solid var(--border-subtle);
    display: flex; flex-direction: column;
    padding: 18px 14px;
    backdrop-filter: blur(var(--glass-blur));
    z-index: 1000; overflow: hidden;
}

.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 6px 16px; margin-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;   /* 折叠态下 .sidebar-collapse 以此为绝对定位锚点 */
}
.brand-icon {
    width: 38px; height: 38px; flex: 0 0 38px;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-primary); border-radius: 10px;
    box-shadow: 0 0 18px var(--neon-green-glow);
}
/* 品牌标：与登录页同款的 SVG 盾形扫描标（替代原 emoji 🔒） */
.brand-icon .brand-mark { width: 24px; height: 24px; display: block; }

/* 🔴 2026-10-15 可读性修复：原 font-family:'Rajdhani' 是**纯拉丁**字体，
   中文「巡影织网」全部回退到系统 sans；再叠一层 text-shadow:0 0 12px 的
   霓虹绿光晕 → 字被糊成一团，用户实测反馈「品牌文字被模糊显示」。
   现在改用中文字体栈、去掉光晕，实色高对比；拉丁副标单独一行小字。 */
.brand-text {
    display: flex; flex-direction: column; justify-content: center;
    min-width: 0; flex: 1 1 auto;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 "Source Han Sans SC", "Noto Sans CJK SC", "Heiti SC", sans-serif;
    font-weight: 700; font-size: 18px; line-height: 1.1;
    letter-spacing: 2px; color: var(--text-primary);
}
.brand-sub {
    display: block; margin-top: 2px;
    font-family: var(--font-display);
    font-size: 9px; font-weight: 600; letter-spacing: 2.5px;
    color: var(--text-muted);
}

/* 侧栏折叠按钮（桌面态显示，移动端隐藏 —— 移动端用顶栏 ☰ 抽屉） */
.sidebar-collapse {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; flex: 0 0 28px; margin-left: auto;
    border: 1px solid var(--border-subtle); border-radius: 8px;
    background: transparent; color: var(--text-muted);
    cursor: pointer; transition: color .25s ease, border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
}
.sidebar-collapse svg { width: 14px; height: 14px; display: block; }
.sidebar-collapse:hover { color: var(--neon-green); border-color: var(--border-glow); background: rgba(0, 255, 157, 0.08); }
.sidebar-collapse.is-collapsed svg { transform: rotate(180deg); }

.sidebar-nav {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 6px; flex: 1 1 auto; overflow-y: auto; padding-right: 2px;
}
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: var(--radius-md);
    color: var(--text-secondary); text-decoration: none;
    font-weight: 600; font-size: 14px; letter-spacing: .5px;
    transition: color .25s ease, background-color .25s ease, transform .25s ease, box-shadow .25s ease; position: relative;
}
/* 导航图标：SVG 线性图标，用 currentColor 取色 → 随皮肤/文字色自动变化 */
.sidebar-link .nav-icon { width: 22px; flex: 0 0 22px; text-align: center; }
.sidebar-link .nav-svg { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }
.sidebar-link:hover { color: var(--neon-green); background: rgba(0, 255, 157, 0.08); transform: translateX(2px); }
.sidebar-link.active {
    color: var(--neon-green); background: rgba(0, 255, 157, 0.14);
    box-shadow: 0 0 18px rgba(0, 255, 157, 0.15);
}
.sidebar-link.active::before {
    content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px;
    border-radius: 2px; background: var(--gradient-primary);
    box-shadow: 0 0 10px var(--neon-green-glow);
}
.sidebar-footer { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.sidebar-link.logout { color: var(--neon-red); }
.sidebar-link.logout:hover {
    background: rgba(255, 51, 102, 0.12); box-shadow: 0 0 15px rgba(255, 51, 102, 0.2); color: var(--neon-red);
}

.sidebar-overlay { display: none; }
.sidebar-overlay.show {
    display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 999;
}

/* —— 右侧主区 —— */
.app-main {
    margin-left: var(--sidebar-w); min-height: 100vh;
    display: flex; flex-direction: column; position: relative;
    z-index: 1; flex: 1 1 auto; min-width: 0;
}

/* 顶条：sticky，沿用 header 既有背景/边框/阴影；仅补高度与 flex 布局 */
.topbar {
    position: sticky; top: 0; z-index: 90;
    display: flex; align-items: center; gap: 12px;
    padding: 0 25px; min-height: 64px;
}
.topbar .header-top { flex: 1 1 auto; border-bottom: none; padding: 0; }
/* 桌面态隐藏顶条 logo，避免与侧栏品牌重复 */
.topbar .header-top .logo-section { display: none; }

.sidebar-toggle {
    display: none; align-items: center; justify-content: center;
    width: 40px; height: 40px; flex: 0 0 40px;
    border-radius: 10px; background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--border-subtle); color: var(--neon-green);
    cursor: pointer; transition: box-shadow .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}
.sidebar-toggle svg { width: 20px; height: 20px; display: block; }
.sidebar-toggle:hover { box-shadow: 0 0 15px rgba(0, 255, 157, 0.25); background: rgba(0, 255, 157, 0.16); }

/* 内容区：仅补 flex:1 把页脚顶到底部；padding 沿用全局 main 规则(40px 25px)，不重复覆盖 */
.app-main > main { flex: 1 1 auto; min-width: 0; position: relative; z-index: 1; }

/* —— 桌面端折叠态（>900px 生效；≤900px 由下方 media 覆盖为「取消折叠」）——
 * 语义：侧栏压成图标条，主区同步左移补位。
 * 🔴 此前这组规则**只存在于下方 @media (max-width:900px) 内**（且是反向的
 * 「移动端取消折叠」兜底），桌面端一条都没有 → 点了箭头 JS 改了属性也没有任何
 * 视觉变化，表现为「按钮不好使」。
 */
html[data-nav-collapsed="1"] .sidebar {
    width: var(--sidebar-w-mini); flex: 0 0 var(--sidebar-w-mini);
    padding-left: 10px; padding-right: 10px;
}
html[data-nav-collapsed="1"] .app-main { margin-left: var(--sidebar-w-mini); }
/* 折叠后隐藏文字，只留图标；同时让图标水平居中 */
html[data-nav-collapsed="1"] .sidebar .brand-text,
html[data-nav-collapsed="1"] .sidebar .nav-label,
html[data-nav-collapsed="1"] .sidebar .sidebar-footer .nav-label { display: none; }
html[data-nav-collapsed="1"] .sidebar-link,
html[data-nav-collapsed="1"] .sidebar-collapse {
    justify-content: center; padding-left: 0; padding-right: 0;
}
/* 折叠后用 title 兜底：无法悬停看文字的图标条仍可提示 */
html[data-nav-collapsed="1"] .sidebar-brand { justify-content: center; padding-left: 0; padding-right: 0; }
/* 折叠后图标条只有 64px，38px 品牌图标 + 28px 箭头放不下同一行
 * → 箭头改为绝对定位，悬停品牌区时淡出显示（点击热区保持可点）。 */
html[data-nav-collapsed="1"] .sidebar-collapse {
    position: absolute; top: 6px; right: 4px;
    margin-left: 0; opacity: 0; pointer-events: none;
    transition: opacity .2s ease, background .2s ease;
}
html[data-nav-collapsed="1"] .sidebar-brand:hover .sidebar-collapse { opacity: 1; pointer-events: auto; }
html[data-nav-collapsed="1"] .sidebar-brand .brand-icon { width: 34px; flex: 0 0 34px; height: 34px; }
/* 右侧栏同理 */
html[data-nav="right"][data-nav-collapsed="1"] .app-main { margin-right: var(--sidebar-w-mini); }

/* —— 响应式：≤900px 侧栏离屏收起 + 汉堡 + 遮罩 —— */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .3s ease; box-shadow: none; }
    .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); }
    .app-main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .topbar .header-top .logo-section { display: flex; }
    /* 移动端用顶栏 ☰ 开合抽屉，侧栏内的折叠箭头没有意义，隐藏 */
    .sidebar-collapse { display: none; }
    /* 移动端不允许折叠态把侧栏压成 64px（它本来就是离屏的，压宽只会让展开后难看） */
    html[data-nav-collapsed="1"] .sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); padding-left: 14px; padding-right: 14px; }
    html[data-nav-collapsed="1"] .sidebar .brand-text,
    html[data-nav-collapsed="1"] .sidebar .nav-label,
    html[data-nav-collapsed="1"] .sidebar .sidebar-footer .nav-label { display: block; }
    html[data-nav-collapsed="1"] .sidebar-link { justify-content: flex-start; padding-left: 14px; padding-right: 14px; }
    html[data-nav-collapsed="1"] .app-main { margin-left: 0; }
    /* 右侧栏在移动端统一回到左侧，避免右手持机时被遮挡 */
    html[data-nav="right"] .sidebar { left: 0; right: auto; border-left: none; border-right: 1px solid var(--border-subtle); }
    html[data-nav="right"] .app-main { margin-right: 0; }
    html[data-nav="right"][data-nav-collapsed="1"] .app-main { margin-right: 0; }
}
@media (max-width: 480px) {
    .topbar { padding: 0 14px; }
    .container { padding: 0 14px; }
}

/* ============================================================================
 * 顶栏窄屏收口（2026-10-29）
 * ----------------------------------------------------------------------------
 * 实测症状（CDP 真渲染，viewport 380~900 逐档扫）：
 *   documentElement.scrollWidth 恒为 1076，而 innerWidth 只有 380~900 →
 *   手机/平板上顶栏右侧的「通知铃铛 / 站点选择器 / 换肤圆点 / 命令面板」
 *   全都在视口外，手指点不到；同时铃铛被 flex-shrink 从 34px 挤成 19px。
 *
 * 根因（两个，叠在一起）：
 *   ① flex 子项默认 min-width:auto → .header-top 拒绝收缩到内容最小宽
 *      （949px = 左组 493 + 右组 456），于是把同级的 .xy-cmdk-trigger
 *      推到 x=1033，kbd 再溢出 7px → 文档宽 1076。
 *   ② ≤900px 时侧栏离屏收起（腾出 248px），**同一断点上**顶栏 logo 反而
 *      显示出来（logo 45 + 站名 252，占 312px）→ 越窄越挤。
 *
 * 修法：先允许收缩，再按「装饰先让位、功能后让位」逐档摘掉，
 *      并用 flex:0 0 auto 保证交互控件绝不被压扁。
 *      任何摘掉的东西都另有入口（换肤→设置/外观，站名→侧栏品牌，时钟无入口纯装饰）。
 * ========================================================================== */
.topbar,
.topbar .header-top,
.topbar .header-left,
.topbar .header-right { min-width: 0; }

/* 交互控件不参与压缩：否则 34px 的铃铛会被挤成 19px（触屏命中区不达标） */
.topbar .sidebar-toggle,
.topbar .xy-notify,
.topbar .xy-cmdk-trigger,
.topbar .site-selector { flex: 0 0 auto; }

@media (max-width: 1024px) {
    /* 装饰：日期+秒表块占 169~209px，且把顶栏从 60px 撑到 106px 高。
       900~1024 这一段侧栏还占着 248px，是「侧栏 + 时钟」同时挤顶栏的区间
       （实测 960px 时换肤圆点被推出视口 29px），所以时钟在 1024 就要让位。 */
    .topbar .header-time { display: none; }
}

@media (max-width: 900px) {
    /* 装饰：拉丁副标题（XUNYING · SECURITY DETECTION）占 170px，
       站名「巡影织网」本身已足够标识，副标题纯装饰 */
    .topbar .site-title-latin { display: none; }
    /* 用户名胶囊占 113px：登录身份在侧栏底部仍完整可见 */
    .topbar .user-info { display: none; }
    .topbar .header-right { gap: 8px; }
    /* 「Ctrl K」提示在触屏无意义，只留放大镜图标（按钮仍可点） */
    .topbar .xy-cmdk-trigger .xy-kbd { display: none; }
}

@media (max-width: 768px) {
    /* 五皮肤速切圆点占 178px（5×24 命中区 + padding）；
       窄屏收回到「设置 → 外观」，那里是同一份皮肤的完整入口 */
    .topbar .header-right .xy-theme-quick { display: none; }
}

@media (max-width: 600px) {
    /* 极窄屏只留品牌图标，站名交给侧栏抽屉 */
    .topbar .site-title { display: none; }
    .topbar .logo-section { gap: 0; }
}

/* ============================================================================
 * P3 页面视觉重建（2026-10-15）
 * ----------------------------------------------------------------------------
 * 背景：文件监控 / 安全告警 / 弹窗管理 / 安全日志四页被用户实测指出
 *      「图标漫无目的占满屏幕、文字解释很小、排版丑陋、廉价感重」。
 * 根因有三：
 *   ① 用了 Tailwind 类名（grid / grid-cols-3 / gap-4 / bg-black/30 /
 *      text-gray-400 / text-primary-color），但本仓库**没有引入 Tailwind**，
 *      这些类名一条都没定义 → 那些「说明卡」实际是完全裸奔的默认样式；
 *   ② bg-black/30、text-gray-400 这类硬编码颜色只对暗色主题成立，
 *      切到浅色皮肤就是「黑底黑字」，直接不可读；
 *   ③ 图标用 emoji 与裸文本符号（'<?php' / '<>' / '{ }' / '()'），
 *      各平台渲染不一、风格割裂，视觉上就是「漫无目的占满屏幕」。
 *
 * 本章所有新组件只引用语义变量（--dark-card / --text-* / --border-* /
 * --neon-*），四套皮肤下自动正确；图标统一用内联 SVG + currentColor。
 * ========================================================================== */

/* —— 通用：组件内的 SVG 图标尺寸与取色 —— */
.xy-svg { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.stat-icon .xy-svg { width: 26px; height: 26px; }

/* —— 说明卡网格：替代原 Tailwind grid/grid-cols-3/gap-4 —— */
.xy-note-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.xy-note-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .xy-note-grid, .xy-note-grid.cols-2 { grid-template-columns: 1fr; } }

.xy-note-card {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px 22px;
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.xy-note-card:hover { border-color: var(--border-glow); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.xy-note-card h4 {
    display: flex; align-items: center; gap: 9px;
    font-size: 15px; font-weight: 700; color: var(--text-primary);
    margin: 0 0 10px; letter-spacing: .5px;
}
.xy-note-card h4 .xy-svg { color: var(--neon-green); }
.xy-note-card p { font-size: 13.5px; line-height: 1.8; color: var(--text-secondary); margin: 0; }

/* —— 文件监控行：替代 .file-item（原 background:rgba(0,0,0,.2) 深色硬编码）—— */
.xy-file-row {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--border-subtle);
    border-radius: 12px;
    transition: border-color .25s ease, transform .25s ease, background-color .25s ease, box-shadow .25s ease;
}
.xy-file-row:hover { border-color: var(--border-glow); border-left-color: var(--neon-green); transform: translateX(3px); }
.xy-file-row.is-changed { border-left-color: var(--neon-yellow); }
.xy-file-row.is-new { border-left-color: var(--neon-cyan); }

.xy-file-ext {
    width: 42px; height: 42px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--neon-green);
}
.xy-file-row.is-changed .xy-file-ext { background: rgba(251, 191, 36, 0.10); color: var(--neon-yellow); }
.xy-file-row.is-new .xy-file-ext { background: rgba(0, 245, 255, 0.10); color: var(--neon-cyan); }
.xy-file-ext .xy-svg { width: 20px; height: 20px; }

.xy-file-main { flex: 1 1 auto; min-width: 0; }
.xy-file-name {
    font-size: 14px; font-weight: 600; color: var(--text-primary);
    word-break: break-all; line-height: 1.4;
}
.xy-file-meta {
    margin-top: 5px; font-size: 12.5px; color: var(--text-muted);
    display: flex; flex-wrap: wrap; gap: 6px 16px; line-height: 1.5;
}
.xy-file-meta b { color: var(--text-secondary); font-weight: 600; }

/* —— 状态徽标（通用，四页共用）—— */
.xy-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .3px;
    white-space: nowrap; flex: none;
}
.xy-badge .xy-svg { width: 13px; height: 13px; }
.xy-badge.ok      { background: rgba(0, 255, 157, 0.14);  color: var(--neon-green); }
.xy-badge.changed { background: rgba(251, 191, 36, 0.14); color: var(--neon-yellow); }
.xy-badge.new     { background: rgba(0, 245, 255, 0.14);  color: var(--neon-cyan); }
.xy-badge.danger  { background: rgba(255, 51, 102, 0.14); color: var(--neon-red); }
.xy-badge.info    { background: rgba(0, 245, 255, 0.14);  color: var(--neon-cyan); }
.xy-badge.muted   { background: rgba(148, 163, 184, 0.14); color: var(--text-muted); }

/* —— 页面主标题：中文主标 + 拉丁副标（替代原纯英文大写标题）—— */
.xy-page-head { margin-bottom: 28px; }
.xy-page-head h1 {
    font-family: var(--font-cjk);
    font-size: 26px; font-weight: 700; color: var(--text-primary);
    letter-spacing: 1px; margin: 0 0 8px; line-height: 1.25;
}
.xy-page-head .xy-page-sub {
    font-size: 13.5px; color: var(--text-secondary); margin: 0; line-height: 1.7;
    max-width: 760px;
}

/* —— 分段标题（卡内小节）—— */
.xy-sec-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 700; color: var(--text-primary);
    margin: 0 0 16px; letter-spacing: .5px;
}
.xy-sec-title .xy-svg { color: var(--neon-green); }
.xy-sec-title .xy-sec-count {
    margin-left: auto; font-size: 12px; font-weight: 600;
    color: var(--text-muted); letter-spacing: 0;
}

/* —— 键值对（替代散落的 <p>大小: x | 修改时间: y</p>）—— */
.xy-kv { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.xy-kv > div { display: flex; align-items: baseline; gap: 7px; font-size: 13px; }
.xy-kv dt, .xy-kv .k { color: var(--text-muted); white-space: nowrap; }
.xy-kv .v { color: var(--text-primary); font-weight: 600; font-family: var(--font-mono); }

/* —— 表格（告警 / 日志 / 弹窗三页共用）—— */
.xy-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border-subtle); }
table.xy-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
table.xy-table thead th {
    background: var(--table-head-bg, rgba(0, 255, 157, 0.06));
    color: var(--text-secondary); font-weight: 700; font-size: 12px;
    letter-spacing: .8px; text-align: left;
    padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}
table.xy-table tbody td {
    padding: 13px 16px; border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary); vertical-align: top; line-height: 1.6;
}
table.xy-table tbody tr:last-child td { border-bottom: none; }
table.xy-table tbody tr { transition: background .2s ease; }
table.xy-table tbody tr:hover { background: var(--table-row-hover, rgba(0, 255, 157, 0.04)); }
table.xy-table .mono { font-family: var(--font-mono); color: var(--text-primary); }
table.xy-table .strong { color: var(--text-primary); font-weight: 600; }
table.xy-table .nowrap { white-space: nowrap; }

/* ============================================================================
 * P3 弹窗管理页组件（2026-10-15）
 * ----------------------------------------------------------------------------
 * 🔴 修复记录：本页原先引用的 .popup-preview / .popup-content / .popup-meta /
 *    .template-list / .template-item / .btn-warning / .btn-info **一条都没有定义**。
 *    后果：「当前弹窗状态」预览区和四张模板卡是完全裸奔的默认样式；
 *    .btn-warning / .btn-info 按钮直接回落成浏览器默认灰色按钮。
 *    本章把这些组件按语义变量补齐，四套皮肤下一致。
 * ========================================================================== */

/* —— 弹窗预览：模拟受监管站点上的真实观感 —— */
.xy-popup-preview {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    background: var(--dark-surface, var(--dark-card));
    box-shadow: var(--shadow-card);
}
.xy-popup-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 14px;
    background: var(--table-head-bg, rgba(0, 255, 157, 0.06));
    border-bottom: 1px solid var(--border-subtle);
}
.xy-popup-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--border-glow); flex: none;
}
.xy-popup-url {
    margin-left: 10px; font-size: 11.5px; color: var(--text-muted); letter-spacing: .5px;
}
.xy-popup-body {
    padding: 20px 22px;
    font-size: 14px; line-height: 1.85; color: var(--text-primary);
    white-space: pre-wrap; word-break: break-word;
    min-height: 76px;
}
.xy-popup-preview.is-warning .xy-popup-body { border-left: 3px solid var(--neon-yellow); }
.xy-popup-preview.is-error   .xy-popup-body { border-left: 3px solid var(--neon-red); }
.xy-popup-preview.is-info    .xy-popup-body { border-left: 3px solid var(--neon-cyan); }

/* —— 模板卡网格 —— */
.xy-tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 768px) { .xy-tpl-grid { grid-template-columns: 1fr; } }
.xy-tpl-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.xy-tpl-card:hover { border-color: var(--border-glow); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.xy-tpl-icon {
    width: 42px; height: 42px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 11px;
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--neon-green);
}
.xy-tpl-icon .xy-svg { width: 20px; height: 20px; }
.xy-tpl-main { flex: 1 1 auto; min-width: 0; }
.xy-tpl-main h4 {
    margin: 0 0 4px; font-size: 14.5px; font-weight: 700; color: var(--text-primary);
}
.xy-tpl-main p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }
.xy-tpl-card form { flex: none; }

/* —— 表单两列布局（类型 + 时长并排）—— */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* —— 补齐缺失的按钮色阶（原先 .btn-warning / .btn-info 无定义 → 浏览器默认灰按钮）—— */
.btn-warning {
    background: var(--gradient-warning);
    color: #1a1205; border: none;
}
.btn-warning:hover { filter: brightness(1.08); box-shadow: 0 0 16px var(--neon-yellow-glow); }
.btn-info {
    background: var(--gradient-info);
    color: #04121a; border: none;
}
.btn-info:hover { filter: brightness(1.08); box-shadow: 0 0 16px var(--neon-cyan-glow); }

/* ============================================================================
 * P3 帮助中心 / 新手引导组件（2026-10-15）
 * ----------------------------------------------------------------------------
 * 这两个页面原先的样式写在页面内的 <style> 块里。虽然浏览器会应用，
 * 但 <style> 位于 <body> 内属于依赖容错的写法，且无法被缓存、
 * 也无法被其他页面复用。统一收敛到本文件。
 * ========================================================================== */

/* —— 帮助中心 —— */
.xy-help-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.xy-help-steps li { display: flex; gap: 15px; align-items: flex-start; padding: 15px 18px;
    background: var(--dark-card); border: 1px solid var(--border-subtle); border-radius: 13px; }
.xy-help-step-n { width: 28px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--gradient-primary); color: #04121a; font-size: 13px; font-weight: 800; }
.xy-help-steps strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.xy-help-steps p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--text-secondary); }

.xy-help-doc-list { display: flex; flex-direction: column; gap: 10px; }
.xy-help-doc { display: flex; gap: 15px; align-items: flex-start; padding: 16px 18px;
    background: var(--dark-card); border: 1px solid var(--border-subtle); border-radius: 13px; transition: border-color .25s ease, transform .25s ease, background-color .25s ease, box-shadow .25s ease; }
.xy-help-doc:hover { border-color: var(--border-glow); transform: translateX(3px); }
.xy-help-doc-ico { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center;
    border-radius: 11px; background: rgba(0, 255, 157, 0.08); border: 1px solid var(--border-subtle); color: var(--neon-green); }
.xy-help-doc-ico .xy-svg { width: 20px; height: 20px; }
.xy-help-doc-b { min-width: 0; }
.xy-help-doc-b h4 { margin: 2px 0 6px; font-size: 15px; font-weight: 700; }
.xy-help-doc-b h4 a { color: var(--text-primary); text-decoration: none; }
.xy-help-doc-b h4 a:hover { color: var(--neon-green); }
.xy-help-doc-b p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--text-secondary); }

/* 2026-10-29：功能说明书按侧栏真实分组展开（6 组 / 全量导航项）。
 * 组标题刻意做成"小标题 + 计数徽标"而不是再套一层卡片 —— 卡片里套卡片
 * 会让层级变糊，而这里需要的是"分隔感"，虚线分隔已经够。 */
.xy-help-lead { margin: 0 0 18px; font-size: 13px; line-height: 1.8; color: var(--text-muted); }
.xy-help-grp + .xy-help-grp { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--border-subtle); }
.xy-help-grp-h { display: flex; align-items: center; gap: 10px; }
.xy-help-grp-h h4 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .04em; color: var(--text-primary); }
.xy-help-grp-n { min-width: 20px; height: 20px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.10); border: 1px solid var(--border-subtle); }
.xy-help-grp-hint { margin: 6px 0 13px; font-size: 12px; line-height: 1.75; color: var(--text-muted); }
/* 「在哪设」标签：跟在标题右侧的灰药丸，比写进正文更省一次扫读 */
.xy-help-where { display: inline-block; margin-left: 10px; padding: 1px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: .02em; vertical-align: 2px;
    color: var(--text-muted); background: rgba(148, 163, 184, 0.10); border: 1px solid var(--border-subtle); }

.xy-faq { display: flex; flex-direction: column; gap: 8px; }
.xy-faq-item { border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; background: var(--dark-card); }
.xy-faq-q { width: 100%; display: flex; align-items: center; gap: 12px; padding: 15px 18px;
    background: transparent; border: none; cursor: pointer; text-align: left; font: inherit; color: var(--text-primary); }
.xy-faq-q:hover { background: var(--table-row-hover, rgba(0, 255, 157, 0.04)); }
.xy-faq-q-ico { color: var(--neon-green); display: flex; }
.xy-faq-q-t { flex: 1 1 auto; font-size: 14px; font-weight: 600; }
.xy-faq-q-ar { color: var(--text-muted); display: flex; transition: transform .25s ease; }
.xy-faq-item.is-open .xy-faq-q-ar { transform: rotate(90deg); color: var(--neon-green); }
.xy-faq-a { display: none; padding: 0 18px 16px 50px; }
.xy-faq-item.is-open .xy-faq-a { display: block; }
.xy-faq-a p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--text-secondary); }
.xy-help-hidden { display: none !important; }

/* —— 新手引导页（welcome.php，独立全屏页）—— */
.xy-welcome-body { background: var(--dark-bg); min-height: 100vh; }
.xy-welcome { max-width: 980px; margin: 0 auto; padding: 28px 24px 40px; display: flex; flex-direction: column; min-height: 100vh; }

.xy-wc-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.xy-wc-brand { display: flex; align-items: center; gap: 12px; }
.xy-wc-mark { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: var(--gradient-primary); border-radius: 11px; box-shadow: 0 0 18px var(--neon-green-glow); }
.xy-wc-mark svg { width: 26px; height: 26px; }
.xy-wc-brand-text { display: flex; flex-direction: column;
    font-family: var(--font-cjk);
    font-size: 18px; font-weight: 700; letter-spacing: 2px; color: var(--text-primary); line-height: 1.1; }
.xy-wc-brand-sub { font-family: var(--font-display); font-size: 9px; font-weight: 600;
    letter-spacing: 3px; color: var(--text-muted); margin-top: 2px; }
.xy-wc-skip { font-size: 13px; color: var(--text-muted); text-decoration: none; transition: color .2s ease; }
.xy-wc-skip:hover { color: var(--neon-green); }

.xy-wc-progress { display: flex; gap: 10px; margin-bottom: 30px; }
.xy-wc-dot { flex: 1 1 0; display: flex; align-items: center; gap: 9px; padding: 11px 14px;
    background: var(--dark-card); border: 1px solid var(--border-subtle); border-radius: 12px;
    color: var(--text-muted); cursor: pointer; transition: border-color .25s ease, color .25s ease, box-shadow .25s ease, background-color .25s ease; text-align: left; font: inherit; }
.xy-wc-dot:hover { border-color: var(--border-glow); color: var(--text-secondary); }
.xy-wc-dot.is-active { border-color: var(--neon-green); color: var(--text-primary); box-shadow: 0 0 14px var(--neon-green-glow); }
.xy-wc-dot.is-done { color: var(--neon-green); }
.xy-wc-dot-num { width: 22px; height: 22px; flex: none; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(0, 255, 157, 0.10); border: 1px solid var(--border-subtle);
    font-size: 12px; font-weight: 700; }
.xy-wc-dot.is-active .xy-wc-dot-num { background: var(--gradient-primary); color: #04121a; border-color: transparent; }
.xy-wc-dot-label { font-size: 13px; font-weight: 600; }

.xy-wc-stage { flex: 1 1 auto; }
.xy-wc-pane { display: none; animation: xyWcIn .32s ease; }
.xy-wc-pane.is-active { display: block; }
@keyframes xyWcIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.xy-wc-eyebrow { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--neon-green); }
.xy-wc-title { margin: 0 0 14px; font-family: var(--font-cjk);
    font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1.25; }
.xy-wc-lead { margin: 0 0 26px; font-size: 14.5px; line-height: 1.85; color: var(--text-secondary); max-width: 780px; }
.xy-wc-lead strong { color: var(--text-primary); }

.xy-wc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.xy-wc-card { background: var(--dark-card); border: 1px solid var(--border-subtle); border-radius: 14px; padding: 22px; transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease, background-color .3s ease; }
.xy-wc-card:hover { border-color: var(--border-glow); transform: translateY(-3px); box-shadow: var(--shadow-card); }
.xy-wc-card-ico { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 12px; background: rgba(0, 255, 157, 0.08); border: 1px solid var(--border-subtle);
    color: var(--neon-green); margin-bottom: 14px; }
.xy-wc-card-ico .xy-svg { width: 22px; height: 22px; }
.xy-wc-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.xy-wc-card p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--text-secondary); }

.xy-wc-note { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px;
    background: var(--notice-bg); border: 1px solid var(--notice-border); border-radius: 12px; }
.xy-wc-note .xy-svg { width: 18px; height: 18px; color: var(--neon-green); margin-top: 2px; }
.xy-wc-note.is-warn { background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.30); }
.xy-wc-note.is-warn .xy-svg { color: var(--neon-yellow); }
.xy-wc-note p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--text-secondary); }
.xy-wc-note strong { color: var(--text-primary); }

.xy-wc-steps { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.xy-wc-steps li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px;
    background: var(--dark-card); border: 1px solid var(--border-subtle); border-radius: 14px; transition: border-color .25s ease, background-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.xy-wc-steps li:hover { border-color: var(--border-glow); }
.xy-wc-step-n { width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--gradient-primary); color: #04121a; font-size: 14px; font-weight: 800; }
.xy-wc-step-b { min-width: 0; }
.xy-wc-step-b h3 { margin: 3px 0 6px; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.xy-wc-step-b p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--text-secondary); }
.xy-wc-step-b code { padding: 1px 6px; border-radius: 5px; background: rgba(0, 255, 157, 0.10);
    border: 1px solid var(--border-subtle); font-family: var(--font-mono); font-size: 12px; color: var(--neon-green); }

.xy-wc-func { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.xy-wc-func-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
    background: var(--dark-card); border: 1px solid var(--border-subtle); border-radius: 13px;
    text-decoration: none; transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease, background-color .25s ease; }
.xy-wc-func-card:hover { border-color: var(--neon-green); transform: translateX(3px); box-shadow: var(--shadow-card); }
.xy-wc-func-ico { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center;
    border-radius: 11px; background: rgba(0, 255, 157, 0.08); border: 1px solid var(--border-subtle); color: var(--neon-green); }
.xy-wc-func-ico .xy-svg { width: 20px; height: 20px; }
.xy-wc-func-t { min-width: 0; }
.xy-wc-func-t strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.xy-wc-func-t em { display: block; font-style: normal; font-size: 12.5px; line-height: 1.7; color: var(--text-muted); }

.xy-wc-contact { border: 1px solid var(--border-subtle); border-radius: 14px; overflow: hidden; margin-bottom: 22px; }
.xy-wc-contact-row { display: flex; gap: 18px; align-items: baseline; padding: 14px 20px;
    background: var(--dark-card); border-bottom: 1px solid var(--border-subtle); }
.xy-wc-contact-row:last-child { border-bottom: none; }
.xy-wc-contact-k { flex: 0 0 150px; font-size: 12.5px; color: var(--text-muted); }
.xy-wc-contact-v { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.xy-wc-contact-v.mono { font-family: var(--font-mono); letter-spacing: .5px; }

.xy-wc-done { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.xy-wc-done .btn-lg { padding: 13px 30px; font-size: 15px; }
.xy-wc-done-sub { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.xy-wc-done-sub:hover { color: var(--neon-green); }

.xy-wc-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border-subtle); }
.xy-wc-nav-hint { font-size: 12px; color: var(--text-muted); }

@media (max-width: 820px) {
    .xy-wc-cards, .xy-wc-func { grid-template-columns: 1fr; }
    .xy-wc-dot-label { display: none; }
    .xy-wc-contact-k { flex-basis: 110px; }
    .xy-wc-nav-hint { display: none; }
}

/* ==========================================================================
 * P3 日志防篡改校验页（logchain.php）
 * 2026-10-15（G1）
 * ========================================================================== */
.xy-note-card.is-ok  { border-color: rgba(0, 255, 157, .38); }
.xy-note-card.is-ok h4 { color: var(--neon-green); }
.xy-note-card.is-warn { border-color: rgba(255, 176, 32, .42); background: rgba(255, 176, 32, .07); }
.xy-note-card.is-warn h4 { color: #FFB020; }
.xy-note-card code {
    font-family: var(--font-mono);
    font-size: 12px; padding: 1px 5px; border-radius: 4px;
    background: rgba(0, 245, 255, .12); color: var(--neon-cyan);
}

/* —— 卡内分区块（两个链各一张卡）—— */
.xy-sec {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md, 14px);
    padding: 20px 22px;
    margin-bottom: 20px;
}

/* —— 校验表单：站点 + 范围 + 按钮 一行排开 —— */
.xy-lc-form {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
    padding: 14px 16px; margin-bottom: 16px;
    background: rgba(0, 0, 0, .16);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm, 10px);
}
.xy-lc-form label {
    display: flex; flex-direction: column; gap: 6px;
    font-size: 12.5px; color: var(--text-secondary); letter-spacing: .3px;
}
.xy-lc-form .xy-select {
    min-width: 220px; height: 38px; padding: 0 32px 0 12px;
    background-color: var(--input-bg, #0C1B2F); color: var(--text-primary);
    border: 1px solid var(--input-border, var(--border-subtle));
    border-radius: var(--radius-sm, 10px); font-size: 13.5px;
}
.xy-lc-form .xy-btn { height: 38px; }

/* —— 统计条 —— */
.xy-lc-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px; margin-bottom: 16px;
}
.xy-lc-stat {
    display: flex; flex-direction: column; gap: 4px;
    padding: 13px 15px; border-radius: var(--radius-sm, 10px);
    background: rgba(0, 0, 0, .18); border: 1px solid var(--border-subtle);
}
.xy-lc-stat .n {
    font-family: var(--font-mono);
    font-size: 24px; font-weight: 700; color: var(--text-primary); line-height: 1.1;
}
.xy-lc-stat .t { font-size: 12px; color: var(--text-muted); letter-spacing: .3px; }
.xy-lc-stat.is-ok  .n { color: var(--neon-green); }
.xy-lc-stat.is-bad .n { color: #FF5C5C; }
.xy-lc-stat.is-bad { border-color: rgba(255, 92, 92, .45); background: rgba(255, 92, 92, .08); }

/* —— 结论条 —— */
.xy-lc-verdict {
    padding: 14px 16px; border-radius: var(--radius-sm, 10px); margin-bottom: 14px;
    border: 1px solid var(--border-subtle); background: rgba(0, 0, 0, .16);
}
.xy-lc-verdict strong { display: block; font-size: 15px; margin-bottom: 5px; letter-spacing: .5px; }
.xy-lc-verdict p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.xy-lc-verdict.is-ok  { border-color: rgba(0, 255, 157, .38); background: rgba(0, 255, 157, .07); }
.xy-lc-verdict.is-ok strong  { color: var(--neon-green); }
.xy-lc-verdict.is-bad { border-color: rgba(255, 92, 92, .45); background: rgba(255, 92, 92, .08); }
.xy-lc-verdict.is-bad strong { color: #FF5C5C; }

/* —— 链信息键值对：换行成行，长哈希不撑破布局 —— */
.xy-kv .xy-kv-row { width: 100%; padding: 7px 0; border-bottom: 1px dashed var(--border-subtle); }
.xy-kv .xy-kv-row:last-child { border-bottom: none; }
.xy-kv .xy-kv-row .k { flex: 0 0 108px; color: var(--text-muted); font-size: 12.5px; }
.xy-kv .xy-kv-row .v { flex: 1; color: var(--text-primary); font-size: 13px; line-height: 1.65; word-break: break-all; }
.xy-kv .xy-kv-row .v.mono {
    font-family: var(--font-mono); font-size: 12px;
}
.xy-kv .xy-kv-row .v.nowrap { word-break: break-all; }

.xy-lc-hint {
    margin: 10px 0 0; font-size: 12.5px; line-height: 1.7;
    color: var(--text-muted);
}

/* —— 危险操作区 —— */
.xy-lc-danger {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
    margin-top: 16px; padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}
.xy-lc-danger-note { font-size: 12px; color: var(--text-muted); line-height: 1.6; max-width: 560px; }

.xy-lc-empty {
    padding: 34px 0; text-align: center;
    color: var(--text-muted); font-size: 13.5px;
}

@media (max-width: 900px) {
    .xy-lc-form { flex-direction: column; align-items: stretch; }
    .xy-lc-form .xy-select { min-width: 0; width: 100%; }
    .xy-kv .xy-kv-row .k { flex-basis: 88px; }
}

/* =====================================================================
 * 设备与会话页（G5：会话聚合与管理） —— 2026-10-15 新增样式
 * 仅补充本页用到的类，复用既有 .card / .stat-card / .btn 体系。
 * ===================================================================== */
.sessions-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sessions-table th, .sessions-table td {
    padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border, #1f2a44);
    white-space: nowrap;
}
.sessions-table th { color: var(--text-muted, #8a96b3); font-weight: 600; font-size: 12px; }
.sessions-table tbody tr:hover { background: rgba(0, 245, 255, 0.04); }
.sessions-table tr.row-current { background: rgba(0, 245, 255, 0.07); }
.sessions-table tr.row-revoked { opacity: 0.55; }

.badge {
    display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px;
    font-weight: 600; line-height: 1.6; border: 1px solid transparent;
}
.badge-online { color: #19e3a0; background: rgba(25, 227, 160, 0.12); border-color: rgba(25, 227, 160, 0.4); }
.badge-current { color: #00d4ff; background: rgba(0, 212, 255, 0.12); border-color: rgba(0, 212, 255, 0.4); }
.badge-revoked { color: #ff6b6b; background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.4); }

.anomaly-list { list-style: none; margin: 8px 0 0; padding: 0; }
.anomaly-item {
    padding: 8px 10px; border-radius: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.5;
    background: rgba(255, 140, 66, 0.07); border: 1px solid rgba(255, 140, 66, 0.25);
}
.anomaly-item.severity-high {
    background: rgba(255, 107, 107, 0.08); border-color: rgba(255, 107, 107, 0.3);
}
.anomaly-tag {
    display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-right: 8px;
    background: rgba(255, 140, 66, 0.2); color: #ffb27a;
}

.card-body { padding: 16px; }
.hint { font-size: 12.5px; color: var(--text-muted, #8a96b3); line-height: 1.6; }
.muted { color: var(--text-muted, #8a96b3); font-size: 12.5px; }
.btn-default {
    background: rgba(255, 255, 255, 0.06); color: var(--text, #e6ecf7);
    border: 1px solid var(--border, #1f2a44);
}
.btn-default:hover { background: rgba(255, 255, 255, 0.1); }

/* ============================================================================
 * 2026-10-16 视觉精修 —— premium 安全运营控制台（展示层，不改任何选择器名）
 * ----------------------------------------------------------------------------
 * 目标：把「霓虹黑页」上调为高端安全控制台观感（参考 Datadog / Splunk /
 * Grafana Enterprise / CrowdStrike Falcon），同时四套皮肤（neon / light /
 * aurora / sunset）行为完全不变。
 *
 * 为什么统一追加在本文件末尾：与既有规则同优先级时「后者胜」，可一次性把散落
 * 各处的视觉微调收敛到一段、便于审阅与回滚；且不触碰任何被 ~30 个 PHP 页面
 * 依赖的类名 / 变量名 / 关键帧名（硬约束）——本段只覆盖「声明值」或新增规则。
 *
 * 设计原则：
 *   · 深度：分层表面（半透明卡片叠在深空渐变背景上）+ 1px 中性细边 + 柔和投影；
 *   · 克制：删除「纯霓虹光斑 / 旋转图标」等廉价动效，动效统一到 160–220ms；
 *   · 语义：颜色一律走 --neon-* / --text-* / --border-* / --dark-card 变量，随皮肤自动正确。
 * ========================================================================== */

/* —— 1) 卡片面：分层表面 + 细边 + 柔和阴影 + 轻抬升 —— */
.card,
.section-card,
.chart-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 62%),
        var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    /* 统一 160–220ms；中性投影取代原 `0 25px 50px 霓虹` 大光斑 */
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* .row 内卡片原为 35px（选择器优先级高于 .card），一并收敛到 24px 网格节奏 */
.row .card { padding: 24px; }

/* analysis-card 是「卡内分区」结构（子块自带内边距）：只改表面，不动 padding */
.analysis-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 62%),
        var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover,
.section-card:hover,
.chart-card:hover,
.analysis-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--border-glow);
}

/* 图标悬停：去掉「放大 + 旋转 + 光晕」，只保留克制的缩放 */
.card:hover .card-icon,
.stat-card:hover .stat-icon,
.analysis-card:hover .analysis-icon-wrap {
    transform: scale(1.06);
    box-shadow: none;
}

/* —— 2) 指标卡：单行标签 + 右上趋势胶囊 + 3px 左侧语义强调条 —— */
.stat-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 62%),
        var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    gap: 18px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
    border-color: var(--border-glow);
}
/* 语义强调条：以左侧 3px 色条替代「整圈彩色边框」，更接近运营控制台的信息层级 */
.stat-card.danger  { border-color: var(--border-subtle); border-left: 3px solid var(--neon-red); }
.stat-card.warning { border-color: var(--border-subtle); border-left: 3px solid var(--neon-yellow); }
.stat-card.info    { border-color: var(--border-subtle); border-left: 3px solid var(--neon-cyan); }

/* 大数字：52px→30px，去霓虹辉光，等宽数字防止刷新时抖动 */
.stat-value {
    font-family: var(--font-mono);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .5px;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    text-shadow: none;
    margin-bottom: 8px;
    transition: color .18s ease;
}
.stat-card.danger  .stat-value { color: var(--neon-red);    text-shadow: none; }
.stat-card.warning .stat-value { color: var(--neon-yellow); text-shadow: none; }
.stat-card.info    .stat-value { color: var(--neon-cyan);   text-shadow: none; }
/* 显式覆盖原 hover 辉光（其优先级 0,3,0 高于单类 .stat-value） */
.stat-card:hover .stat-value { text-shadow: none; }

/* 标签：原 4px 字距 + 大写导致中文换行 / 拥挤 → 收敛字距并强制单行省略 */
.stat-label {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-trend { top: 12px; right: 12px; z-index: 2; }

/* 大号数字同族：dashboard 的 .card-value 一并收敛，避免与其他指标卡字号割裂 */
.card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: .5px;
    font-variant-numeric: tabular-nums;
    text-shadow: none;
}
.card:hover .card-value { text-shadow: none; transform: none; }

/* —— 3) 标题层级：巨型渐变字 → 清晰实色标题 —— */
.page-header h1,
.page-title {
    font-family: var(--font-ui);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: .5px;
    /* 原为 background-clip 渐变字：小字号下对比弱、且是「黑客风」主因；改实色 */
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: var(--text-primary);
}
.page-header h1 { margin-bottom: 14px; }
.page-header p,
.page-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: .3px;
    line-height: 1.65;
}
/* 标题下方装饰条：5px 渐变 + 辉光 → 44×2px 实色下划线 */
.page-header h1::after,
.page-title::after {
    width: 44px;
    height: 2px;
    border-radius: 1px;
    background: var(--neon-green);
    box-shadow: none;
}
.card-header h3 {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .4px;
}
.card-header { padding-bottom: 14px; margin-bottom: 18px; }
.card-header::after { width: 40px; height: 2px; }
.section-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 18px;
    padding-bottom: 14px;
}

/* —— 4) 表格：粘性表头 + 大写疏排 th + 行悬停淡染 + 干净分隔线 —— */
.data-table { font-size: 13px; }
.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px 14px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--table-head-bg, rgba(0, 255, 157, 0.06));
    border-bottom: 1px solid var(--border-subtle);
}
.data-table th::after { bottom: -1px; }
.data-table td { padding: 12px 14px; font-size: 13px; color: var(--text-secondary); }
/* 行悬停：原整行文字变霓虹绿 → 改为中性强调（仅底色淡染 + 文字回到主色） */
.data-table tbody tr:hover,
.data-table tr:hover td { background: var(--table-row-hover, rgba(0, 255, 157, 0.06)); }
.data-table tr:hover td { color: var(--text-primary); }

/* —— 5) 按钮 / 标签 / 筛选 / 表单：统一圆角 + 收敛霓虹 + 焦点态 —— */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .6px;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-primary { box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .30); }
.btn-outline:hover { box-shadow: none; }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); letter-spacing: .4px; }
.btn-small { padding: 6px 12px; font-size: 11.5px; letter-spacing: .4px; }

.tag {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .4px;
}

.filter-bar { padding: 16px 18px; border-radius: var(--radius-md); gap: 14px; }
.filter-select,
.filter-input,
.filter-reset { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; }

.form-label { font-size: 12.5px; letter-spacing: .6px; }
.form-input {
    padding: 11px 14px;
    border-radius: var(--radius-md);
    font-size: 14px;
}
/* 焦点环：3px 皮肤自适应描边（原为 30px 霓虹光斑） */
.filter-select:focus,
.filter-input:focus,
.form-input:focus {
    box-shadow: 0 0 0 3px var(--border-glow);
}
/* 输入框聚焦不再上移（会打乱表单基线） */
.form-input:focus { transform: none; }

/* —— 6) 侧栏 / 顶条：精修间距与激活态 —— */
.sidebar { padding: 16px 12px; }
.sidebar-brand { padding: 8px 6px 14px; margin-bottom: 12px; }
.sidebar-link {
    padding: 10px 12px;
    letter-spacing: .2px;
    transition: color .16s ease, background .16s ease, transform .16s ease;
}
/* 激活项：左侧强调条（.sidebar-link.active::before 既有）+ 柔和底色，去掉外发光 */
.sidebar-link.active {
    background: rgba(0, 255, 157, 0.10);
    box-shadow: none;
}
.topbar { padding: 0 20px; min-height: 60px; }

/* —— 7) 键盘焦点环：仅键盘聚焦(:focus-visible)出现，统一用主色 —— */
.btn:focus-visible,
.xy-btn:focus-visible,
.btn-primary:focus-visible,
.btn-danger:focus-visible,
.btn-outline:focus-visible,
.btn-secondary:focus-visible,
.filter-btn:focus-visible,
.filter-reset:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
}
.form-input:focus-visible,
.filter-input:focus-visible,
.filter-select:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 1px;
}
.sidebar-link:focus-visible,
.sidebar-collapse:focus-visible,
.sidebar-toggle:focus-visible,
.xy-theme-dot:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: -2px;
}

/* —— 8) 无障碍：尊重「减少动态效果」，关闭装饰性动画与过渡 —— */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================================================
 * 2026-10-17 全面 UI/UX 重构层（本层位于文件末尾，级联优先级最高）
 * ----------------------------------------------------------------------------
 * 目标（对应用户需求 1/3/4/6/7）：
 *   ① 排版大幅度升级：统一字号阶梯 / 间距节奏 / 信息层级 / 品牌标题条
 *   ② 消灭「裸控件」：原生 input / select / textarea 未带任何类时也必须有
 *      完整边框、内边距、聚焦环、过渡反馈（图三问题的根治）
 *   ③ 专业化：克制的阴影与动效、统一的控件高度、表格与筛选条精修
 *   ④ 品牌融入：标题品牌渐变条、侧栏品牌基线、统一品牌渐变
 *   ⑤ 性能与流畅度：动效时长收敛到 0.16–0.24s，hover 只动 transform/透明度
 *
 * 结构差异（圆角 / 阴影 / 边框气质）由 theme.css 按皮肤覆写 --radius-card /
 * --radius-btn / --radius-input / --shadow-card 等形态 token 实现 —— 本层全部
 * 引用变量，不在此处写死形态。
 * ========================================================================== */

/* —— A. 设计令牌：字号阶梯 / 控件形态 / 阴影刻度 / 动效刻度 / 品牌渐变 —— */
:root {
    /* 字号阶梯（中文阅读优化：正文 15px、行高 1.65） */
    --fs-display: 30px;   /* 登录页/欢迎页主标 */
    --fs-h1: 26px;        /* 页面主标题 */
    --fs-h2: 19px;        /* 区块标题 */
    --fs-h3: 16px;        /* 卡片标题 */
    --fs-body: 15px;      /* 正文 */
    --fs-sm: 13px;        /* 辅助说明 */
    --fs-xs: 12px;        /* 标签/徽章 */
    --lh-body: 1.65;

    /* 控件形态（皮肤可在 theme.css 覆写，形成结构性差异） */
    --radius-card: 16px;
    --radius-btn: 10px;
    --radius-input: 10px;
    --control-h: 40px;        /* 输入框 / 按钮统一高度 */

    /* 阴影刻度 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.22);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.38);
    --shadow-focus: 0 0 0 3px var(--border-glow);

    /* 动效刻度（收敛：快、稳、不飘） */
    --dur-1: 0.16s;
    --dur-2: 0.22s;
    --ease-std: cubic-bezier(0.33, 1, 0.68, 1);

    /* 品牌母题：青 → 蓝渐变（巡影织网 XUNYING 品牌色带） */
    --brand-gradient: var(--gradient-primary);
    --brand-bar-w: 4px;

    /* 表单控件配色（皮肤可覆写；neon 默认） */
    --input-bg: rgba(15, 22, 40, 0.55);
    --input-bg-focus: rgba(18, 26, 46, 0.75);
    --input-border: rgba(130, 150, 190, 0.28);
    --input-border-hover: rgba(130, 150, 190, 0.45);
    --input-placeholder: rgba(255, 255, 255, 0.32);
}

/* —— B. 全局表单控件规范化（消灭裸输入框：不修页面、样式层根治） ——
 * 只设「地板样式」：元素选择器优先级最低，任何既有类样式
 * （.form-input / .filter-input / .filter-select / .xy-select …）都会覆盖它。 */
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]),
select,
textarea {
    padding: 9px 14px;
    min-height: var(--control-h);
    background: var(--input-bg);
    color: var(--text-primary);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    max-width: 100%;
    transition: border-color var(--dur-1) var(--ease-std),
                box-shadow var(--dur-1) var(--ease-std),
                background var(--dur-1) var(--ease-std);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):hover,
select:hover,
textarea:hover {
    border-color: var(--input-border-hover);
}
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--neon-green);
    background: var(--input-bg-focus);
    box-shadow: var(--shadow-focus);
}
::placeholder { color: var(--input-placeholder); opacity: 1; }
input:disabled, select:disabled, textarea:disabled {
    opacity: 0.55; cursor: not-allowed;
}

/* 下拉箭头：用两条 CSS 渐变画 caret，颜色取自变量 → 六套皮肤自动适配 */
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 50%,
        calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    cursor: pointer;
}
select:focus {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--neon-green) 50%),
        linear-gradient(135deg, var(--neon-green) 50%, transparent 50%);
}
/* 下拉选项与原生日期/时间/颜色控件的皮肤适配 */
:root { color-scheme: dark; }
select option {
    background: var(--dark-surface);
    color: var(--text-primary);
}

/* 复选 / 单选：主色 accent，统一 16px 可点尺寸 */
input[type="checkbox"], input[type="radio"] {
    width: 16px; height: 16px;
    accent-color: var(--neon-green);
    cursor: pointer;
    vertical-align: -3px;
}

/* —— C. 排版与信息层级 —— */
body {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* 页面主标题：品牌渐变条 + 明确层级（裸 h1 与 .page-title 通吃） */
main h1, .page-title {
    position: relative;
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    padding-left: calc(var(--brand-bar-w) + 14px);
    margin-bottom: 6px;
}
main h1::before, .page-title::before {
    content: '';
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: var(--brand-bar-w);
    border-radius: 2px;
    background: var(--brand-gradient);
    box-shadow: 0 0 12px var(--neon-green-glow);
}
/* 主标题下一行的副标题（页面描述）统一弱化样式 */
main h1 + p, .page-title + p, .page-subtitle {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    letter-spacing: 0.3px;
    margin-bottom: 26px;
    padding-left: calc(var(--brand-bar-w) + 14px);
}

/* 区块标题（设置页 h2 / 面板 h2） */
.settings-h2, main h2 {
    font-size: var(--fs-h2);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}
/* 卡片 / 面板内 h3：去纯拉丁 Orbitron（中文回退伪加粗问题），用正文字体栈加粗 */
.chart-card h3, .section-title, .xy-sec-title {
    font-family: inherit;
    font-size: var(--fs-h3);
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

/* 内容区节奏：主区 padding 与卡片间距统一 */
main { padding: 30px 28px 40px; }

/* —— D. 卡片 / 面板：形态 token 化（皮肤结构性差异的承载点） —— */
.card, .stat-card, .panel, .section-card, .chart-card, .analysis-card,
.table-container, .filter-bar, .login-box, .alert-box,
.settings-card, .xy-card {
    border-radius: var(--radius-card);
}
.card, .stat-card, .panel, .section-card, .chart-card, .analysis-card {
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-2) var(--ease-std),
                border-color var(--dur-2) var(--ease-std),
                box-shadow var(--dur-2) var(--ease-std);
}
.stat-card:hover, .chart-card:hover, .analysis-card:hover {
    transform: translateY(-3px);
}

/* 统计卡图标容器：统一 44px 圆角块 + 主色淡底（替代突兀的彩色实底） */
.stat-icon, .card-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px;
    border-radius: calc(var(--radius-card) - 4px);
    background: rgba(0, 255, 157, 0.10);
    border: 1px solid var(--border-subtle);
    color: var(--neon-green);
    font-size: 20px;
}
.stat-icon svg, .card-icon svg { width: 22px; height: 22px; display: block; }

/* 空状态图标统一弱化 */
.empty-icon { color: var(--text-muted); }
.empty-icon svg { width: 44px; height: 44px; }

/* —— E. 按钮体系：统一高度 / 形态 token / 克制动效 —— */
.btn, .xy-btn, .btn-primary, .btn-danger, .btn-outline, .btn-secondary,
.filter-btn, .filter-reset {
    min-height: var(--control-h);
    padding: 9px 20px;
    border-radius: var(--radius-btn);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.4px;
    transition: transform var(--dur-1) var(--ease-std),
                box-shadow var(--dur-1) var(--ease-std),
                filter var(--dur-1) var(--ease-std),
                background var(--dur-1) var(--ease-std),
                border-color var(--dur-1) var(--ease-std);
}
.btn:hover, .xy-btn:hover, .btn-primary:hover, .btn-danger:hover,
.btn-outline:hover, .btn-secondary:hover, .filter-btn:hover {
    transform: translateY(-1px);
}
.btn:active, .xy-btn:active, .btn-primary:active, .btn-danger:active,
.btn-outline:active, .btn-secondary:active, .filter-btn:active {
    transform: translateY(0);
}
/* 主按钮统一品牌渐变（皮肤随 --gradient-primary 联动） */
.btn-primary, .xy-btn-primary, .filter-btn {
    background: var(--brand-gradient);
}

/* —— F. 表格精修：表头层级 / 行反馈 / 密度 —— */
.data-table th, table th {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 13px 16px;
    background: var(--table-head-bg, rgba(127, 127, 127, 0.06));
}
.data-table td, table td {
    padding: 12px 16px;
    font-size: 14px;
}
.data-table tr, table tbody tr {
    transition: background var(--dur-1) var(--ease-std);
}

/* —— G. 筛选条：统一成一张「工具条面板」 —— */
.filter-bar {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}
.filter-select, .filter-input {
    min-height: var(--control-h);
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    color: var(--text-primary);
}
/* 下拉箭头占位：防止 caret 与选项文字相碰 */
.filter-select { padding-right: 34px; }

/* —— H. 品牌融入 —— */
/* 侧栏品牌区：底部品牌渐变基线（替代中性分隔线的一段） */
.sidebar-brand::after {
    content: '';
    position: absolute;
    left: 6px; right: 6px; bottom: -1px;
    height: 2px;
    border-radius: 1px;
    background: var(--brand-gradient);
    opacity: 0.85;
}
/* 品牌渐变文字工具类（登录页/欢迎页/标题点缀可用） */
.text-brand {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* 顶栏时间块与用户块：统一控件语言（圆角 token + 中性边） */
.header-time, .user-info {
    border-radius: var(--radius-btn);
    transition: border-color var(--dur-1) var(--ease-std),
                box-shadow var(--dur-1) var(--ease-std);
}

/* —— I. 性能与流畅度 —— */
/* 收敛全局过长的过渡时长（0.35–0.4s → 0.22s），保留回弹感 */
.nav-item, .sidebar-link, .card, .panel, .section-card {
    transition-duration: var(--dur-2);
}
/* 弹层/抽屉类重绘隔离，减少主线程回流 */
.xy-confirm-box, .xy-toast-item, .xy-tour-tip {
    contain: layout paint;
}

/* —— J. 内联 SVG 图标尺寸对齐（emoji → xy_icon() 全站替换后的统一基线） —— */
h1 .xy-svg, h2 .xy-svg, h3 .xy-svg, h4 .xy-svg,
.card-header .xy-svg, .xy-sec-title .xy-svg, .section-title .xy-svg {
    width: 18px; height: 18px;
    vertical-align: -3px;
    margin-right: 8px;
}
.btn .xy-svg, .xy-btn .xy-svg, .filter-btn .xy-svg {
    width: 15px; height: 15px;
    vertical-align: -2px;
    margin-right: 6px;
}
.alert-icon .xy-svg { width: 20px; height: 20px; }


/* ############################################################################
 * ============================================================================
 * 全站重构层 V2.0 —— 赛博指挥舱（2026-10-17）
 * ----------------------------------------------------------------------------
 * 本层是全站 UI 重构的核心追加，分四段：
 *
 *   §A 缺陷修复     侧栏硬编码渐变改为 --bg-sidebar 变量（换肤后侧栏不变色的修复）
 *   §B 组件响应     卡片/按钮/表格/表单圆角与内边距全部改由 theme.css 形态 token 驱动
 *   §C 全站交互增强 卡片浮起+光边扫过、按钮按压、表格行高亮、输入聚焦辉光（六套共享）
 *   §D neon 指挥舱   扫描线+动态网格+卡片切角+等宽数字+终端辉光（neon 专属主场）
 *
 * 设计纪律：本层只追加覆盖，不改动上面任何一行旧规则 → 旧行为 100% 保留，
 *           业务功能/数据接口零触碰；非 neon 皮肤的指挥舱装饰一律不渲染。
 * ========================================================================== */


/* ============================================================================
 * §A 缺陷修复：侧栏背景改由 --bg-sidebar 变量驱动
 * ----------------------------------------------------------------------------
 * 旧规则（第 3366 行）把侧栏背景写死为深色渐变，导致换 light 等皮肤后
 * 侧栏仍是深色。改为 var(--bg-sidebar) 后由 theme.css 各皮肤接管。
 * ========================================================================== */
.sidebar { background: var(--bg-sidebar); }


/* ============================================================================
 * §B 组件形态响应：圆角 / 内边距 / 控件高度全部 token 化
 * ----------------------------------------------------------------------------
 * 让六套皮肤的 --radius-* / --pad-card / --control-h 真正落到组件上。
 * 追加层的同名选择器优先级高于上文旧规则，安全接管。
 * ========================================================================== */
.card, .stat-card, .section-card, .chart-card, .analysis-card,
.table-container, .filter-bar, .panel, .xy-confirm-box, .xy-tour-tip {
    border-radius: var(--radius-card);
}
.card, .stat-card, .section-card { padding: var(--pad-card); }

.btn, .xy-btn, .filter-btn, .btn-primary, .btn-danger, .btn-outline,
.btn-secondary, .filter-reset {
    border-radius: var(--radius-btn);
    min-height: var(--control-h);
}
.btn-sm { min-height: 0; border-radius: calc(var(--radius-btn) * 0.8); }

.form-input, .form-select, .form-textarea, .filter-input, .filter-select,
input[type="text"], input[type="password"], input[type="number"],
input[type="email"], select, textarea {
    border-radius: var(--radius-input);
}

/* 数字质感：统计大数字 / 时间 / 计数器统一用等宽数字字体（专业感来源） */
.stat-value, .card-value, .time-display, .hm-num, .live-num,
.data-table td, .kpi-value {
    font-family: var(--font-num);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}


/* ============================================================================
 * §C 全站交互增强（六套皮肤共享，辉光强度受 --glow-strength 节制）
 * ----------------------------------------------------------------------------
 * light 的 --glow-strength 较低 → 这些动效里的辉光自动归零，
 * 只保留位移/描边等不发光反馈；neon/aurora/sunset 则满辉光。
 * ========================================================================== */

/* —— C1. 卡片浮起 + 顶部光边扫过 —— */
.card, .stat-card, .chart-card, .section-card, .analysis-card {
    position: relative;
    overflow: hidden;
    transition: transform .22s cubic-bezier(.34,1.4,.64,1),
                border-color .22s ease,
                box-shadow .22s ease;
}
.card::before, .stat-card::before, .chart-card::before,
.section-card::before, .analysis-card::before {
    content: '';
    position: absolute; top: 0; left: -80%;
    width: 60%; height: 100%;
    background: linear-gradient(100deg,
        transparent 0%,
        rgba(255,255,255, calc(0.06 * var(--glow-strength))) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    transition: left .5s ease;
    pointer-events: none;
}
.card:hover::before, .stat-card:hover::before, .chart-card:hover::before,
.section-card:hover::before, .analysis-card:hover::before { left: 130%; }

.card:hover, .stat-card:hover, .chart-card:hover,
.section-card:hover, .analysis-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-card),
                0 0 calc(24px * var(--glow-strength)) var(--neon-green-glow);
}

/* —— C2. 按钮按压反馈（按下微缩） —— */
.btn, .xy-btn, .filter-btn, .action-btn, .sidebar-link {
    transition: transform .15s cubic-bezier(.34,1.5,.64,1),
                box-shadow .18s ease,
                background .18s ease,
                color .18s ease,
                border-color .18s ease;
}
.btn:active, .xy-btn:active, .filter-btn:active, .action-btn:active {
    transform: scale(0.96);
}

/* —— C3. 表格行高亮 + 左侧强调条 —— */
.data-table tbody tr {
    position: relative;
    transition: background .15s ease;
}
.data-table tbody tr:hover td {
    background: var(--table-row-hover);
}
.data-table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--neon-green);
}

/* —— C4. 输入框聚焦辉光（呼吸） —— */
.form-input:focus, .form-select:focus, .form-textarea:focus,
.filter-input:focus, .filter-select:focus,
input[type="text"]:focus, input[type="password"]:focus,
input[type="number"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--border-glow);
    box-shadow: 0 0 0 3px rgba(0,0,0,0),
                0 0 calc(14px * var(--glow-strength)) var(--neon-green-glow);
    background: var(--input-bg);
}

/* —— C5. 侧栏活动项光条滑动 —— */
.sidebar-link { position: relative; overflow: hidden; }
.sidebar-link::after {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    box-shadow: 0 0 calc(8px * var(--glow-strength)) var(--neon-green-glow);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform .25s cubic-bezier(.34,1.4,.64,1);
}
.sidebar-link.active::after { transform: scaleY(1); }

/* —— C6. 页面淡入（加载完成后的柔和进入） —— */
@keyframes xyPageIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.app-main > main { animation: xyPageIn .4s ease both; }

/* —— C7. 链接/图标微交互 —— */
.view-all, .ip-link {
    transition: color .15s ease, transform .18s ease;
    display: inline-block;
}
.view-all:hover, .ip-link:hover { transform: translateX(3px); }

/* 尊重「减少动态」系统偏好：关闭所有过渡动画，保功能不伤可及性 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================================
 * §D neon 指挥舱 —— 专属主场（仅 neon 皮肤渲染，其余皮肤零开销）
 * ----------------------------------------------------------------------------
 * 这是「巡影织网」的品牌门面：扫描线 + 增强网格 + 卡片切角 + 终端质感。
 * 全部限定在 html:not([data-theme]) 与 [data-theme="neon"] 下，
 * 其他皮肤连节点样式都不匹配，零运行时开销。
 * ========================================================================== */
html:not([data-theme]),
html[data-theme="neon"] {

    /* —— D1. 指挥舱背景：动态网格加密 + 扫描线 —— */
    body::before {
        background:
            radial-gradient(ellipse at 20% 10%, rgba(0, 255, 157, 0.08) 0%, transparent 42%),
            radial-gradient(ellipse at 80% 90%, rgba(0, 245, 255, 0.05) 0%, transparent 42%),
            radial-gradient(ellipse at 50% 50%, rgba(168, 85, 247, 0.03) 0%, transparent 60%);
    }
    body::after {
        background-image:
            linear-gradient(rgba(0, 255, 157, 0.03) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0, 255, 157, 0.03) 1px, transparent 1px),
            /* 扫描线：每 4px 一条 1px 微亮横线，营造 CRT 终端质感 */
            repeating-linear-gradient(0deg,
                rgba(0, 255, 157, 0.025) 0px, rgba(0, 255, 157, 0.025) 1px,
                transparent 1px, transparent 4px);
        background-size: 60px 60px, 60px 60px, 100% 4px;
    }

    /* —— D2. 指挥舱卡片：右上角切角 + 左侧终端光条 —— */
    .card, .stat-card, .chart-card, .section-card, .analysis-card {
        clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
        border-left: 2px solid var(--border-glow);
        background: linear-gradient(135deg,
            rgba(0, 255, 157, 0.04) 0%,
            var(--dark-card) 30%);
    }

    /* —— D3. 指挥舱大数字：终端绿 + 微辉光 —— */
    .stat-value, .card-value, .hm-num, .live-num {
        color: var(--neon-green);
        text-shadow: 0 0 14px var(--neon-green-glow);
        font-weight: 700;
    }

    /* —— D4. 指挥舱表头：等宽 + 全大写拉丁感 + 底部强调线 —— */
    .data-table th {
        font-family: var(--font-num);
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--neon-cyan);
        border-bottom: 2px solid var(--border-glow);
    }

    /* —— D5. 指挥舱顶栏：底部扫描光带 —— */
    .topbar, header {
        box-shadow: 0 1px 0 var(--border-glow),
                    0 8px 24px rgba(0, 0, 0, 0.45);
    }

    /* —— D6. 指挥舱侧栏品牌标：呼吸辉光 —— */
    .brand-icon {
        animation: neonBrandBreath 3s ease-in-out infinite;
    }
    @keyframes neonBrandBreath {
        0%, 100% { box-shadow: 0 0 18px var(--neon-green-glow); }
        50%      { box-shadow: 0 0 30px var(--neon-green-glow); }
    }

    /* —— D7. 指挥舱滚动条：终端绿 —— */
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: rgba(0, 255, 157, 0.03); }
    ::-webkit-scrollbar-thumb {
        background: rgba(0, 255, 157, 0.25);
        border-radius: 5px;
        border: 2px solid transparent;
        background-clip: padding-box;
    }
    ::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 157, 0.45); background-clip: padding-box; }
}


/* ============================================================================
 * §D2 aurora 专属：三色极光盘在背景缓慢漂移
 * ========================================================================== */
html[data-theme="aurora"] body::before {
    background:
        radial-gradient(ellipse 60% 45% at 12% 8%, rgba(94, 149, 245, 0.16) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 88% 18%, rgba(168, 85, 247, 0.13) 0%, transparent 60%),
        radial-gradient(ellipse 55% 45% at 55% 95%, rgba(34, 211, 238, 0.10) 0%, transparent 60%);
    animation: auroraDrift 26s ease-in-out infinite alternate;
}
html[data-theme="aurora"] body::after { display: none; }
@keyframes auroraDrift {
    0%   { background-position: 0% 0%, 0% 0%, 0% 0%; }
    50%  { background-position: 4% 6%, -5% 4%, 6% -4%; }
    100% { background-position: -4% -3%, 5% -5%, -6% 5%; }
}
/* 极光毛玻璃卡 */
html[data-theme="aurora"] .card,
html[data-theme="aurora"] .stat-card,
html[data-theme="aurora"] .panel,
html[data-theme="aurora"] .section-card,
html[data-theme="aurora"] .chart-card,
html[data-theme="aurora"] .analysis-card,
html[data-theme="aurora"] .filter-bar,
html[data-theme="aurora"] .table-container {
    background: rgba(20, 28, 62, 0.45);
    border-color: rgba(160, 185, 255, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}


/* ============================================================================
 * §D3 sunset 专属：暖光晕 + 胶囊按钮加大内边距
 * ========================================================================== */
html[data-theme="sunset"] body::before {
    background:
        radial-gradient(ellipse 55% 42% at 85% 6%, rgba(255, 153, 0, 0.14) 0%, transparent 60%),
        radial-gradient(ellipse 50% 42% at 8% 92%, rgba(255, 107, 157, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 45% 38% at 50% 50%, rgba(255, 209, 102, 0.05) 0%, transparent 65%);
}
html[data-theme="sunset"] body::after { display: none; }
html[data-theme="sunset"] .btn,
html[data-theme="sunset"] .xy-btn,
html[data-theme="sunset"] .filter-btn,
html[data-theme="sunset"] .btn-primary,
html[data-theme="sunset"] .btn-danger,
html[data-theme="sunset"] .btn-outline,
html[data-theme="sunset"] .btn-secondary {
    padding-left: 24px;
    padding-right: 24px;
}


/* ============================================================================
 * §D6 light 专属：零网格零光晕 + 柔影 hover
 * ========================================================================== */
html[data-theme="light"] body::before {
    background:
        radial-gradient(ellipse at 15% 0%, rgba(14, 165, 233, 0.05) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 100%, rgba(99, 102, 241, 0.04) 0%, transparent 45%);
}
html[data-theme="light"] body::after { display: none; }
html[data-theme="light"] .card:hover,
html[data-theme="light"] .stat-card:hover,
html[data-theme="light"] .chart-card:hover,
html[data-theme="light"] .section-card:hover,
html[data-theme="light"] .analysis-card:hover {
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(15, 23, 42, 0.10);
    transform: translateY(-3px);
}
/* 浅色下主按钮用深色文字保证对比 */
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .xy-btn-primary,
html[data-theme="light"] .filter-btn { color: #06202b; }
html[data-theme="light"] main h1::before,
html[data-theme="light"] .page-title::before { box-shadow: none; }


/* ============================================================================
 * 全站重构层 V3.0 —— 字体系统接管（2026-10-17 P1）
 * ----------------------------------------------------------------------------
 * 字体文件已全量本地化（public/css/fonts.css + public/fonts/，
 * 17 个 woff2 共约 448KB，全 SIL OFL 1.1，零外网依赖）。
 *
 * 本层把组件接到 theme.css 的四级字体 token：
 *   --font-display 标题 / --font-ui 正文 / --font-num 数字 / --font-mono 代码
 *
 * 🔴 2026-10-25 补正（原注释三处说法已不成立，留着会害人）：
 *   ① 原文"13 个 woff2 共约 276KB" —— 那是设计稿上的数字，文件当时并不存在。
 *      现在实际是 17 个 / 448KB。
 *   ② 原文"旧规则中的硬编码 font-family 不受影响" —— 已经不成立了。
 *      本轮把 style.css 里 61 处写死的 'Orbitron' / 'Share Tech Mono' / 'Rajdhani'
 *      全部改成 var(--font-*) 了；不改的话切皮肤只换标题、正文纹丝不动。
 *      保留的 8 处是 inherit / var() / ui-monospace 系统兜底，本就无需改。
 *   ③ 原文"'Share Tech Mono' 由 fonts.css 的同名 @font-face 别名接管" —— 没有这条别名。
 *      建别名意味着它永远指向同一个字体，皮肤差异就没了。这里的做法是
 *      直接把引用换成 var(--font-mono)，由皮肤决定具体是 JBM / Plex Mono /
 *      Fira Code / Space Mono 中的哪一个。
 * ========================================================================== */

/* 正文与表单控件统一走 --font-ui */
body, button, input, select, textarea { font-family: var(--font-ui); }

/* 标题层走 --font-display：neon=Orbitron / light=Lora+宋体 / aurora=Outfit
 * / sunset=Nunito / scenery=Lora+宋体（正文 Manrope） */
h1, h2, h3,
.settings-h2, .section-title, .card-title, .panel-title,
.card-header h3, .section-header h2 {
    font-family: var(--font-display);
}

/* 代码 / 日志 / 等宽面走 --font-mono（六皮肤各不同：JBM / Plex Mono / Fira Code / Space Mono） */
code, pre, kbd, samp { font-family: var(--font-mono); }

/* 顶栏秒表：等宽数字，跳秒不抖 */
.time-display { font-variant-numeric: tabular-nums; }


/* ============================================================================
 * 粒子画布层（2026-10-17 P2：xy-particles.js）
 * ----------------------------------------------------------------------------
 * z-index:0 —— 在 body 实色背景之上、内容层（.app-shell/.app-main z-index:1）之下；
 * pointer-events:none —— 永不拦截点击。登录页 .xy-wrap 提层同理。
 * ========================================================================== */
#xy-particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.xy-wrap { position: relative; z-index: 1; }


/* ============================================================================
 * 全站重构层 V3.1 —— 微交互与皮肤专属强化（2026-10-17 P3/P4）
 * ----------------------------------------------------------------------------
 * ① Toast 进度条        ② Staggered 入场（neon/aurora/sunset）
 * ③ neon 状态呼吸点     ④ scenery 空白（风景皮肤只用背景层做装饰）
 * ⑤ aurora 玻璃高光边   ⑥ sunset 鼠标光晕层
 * ⑦ 全皮肤滚动条        ⑧ reduced-motion 降级
 * ========================================================================== */

/* —— ① Toast 进度条（配合 xy-ui.js P3 队列版）—— */
.xy-toast-item { position: relative; overflow: hidden; cursor: pointer; }
.xy-toast-bar {
    position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
    background: currentColor; opacity: .55;
    transform-origin: left center;
    animation: xyToastBar 4s linear forwards;
}
@keyframes xyToastBar {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* —— ② Staggered 入场：三套风格化皮肤卡片依次浮现（60ms 阶梯，限前 8 个）——
 * to 帧只写 opacity：transform 播完回基础值，不抢占卡片 hover 浮起。—— */
@keyframes xyCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; }
}
html:not([data-theme]) main .card, html:not([data-theme]) main .stat-card,
html[data-theme="neon"] main .card, html[data-theme="neon"] main .stat-card,
html[data-theme="aurora"] main .card, html[data-theme="aurora"] main .stat-card,
html[data-theme="sunset"] main .card, html[data-theme="sunset"] main .stat-card {
    animation: xyCardIn .5s ease backwards;
}
html:not([data-theme]) main .card:nth-of-type(2), html:not([data-theme]) main .stat-card:nth-of-type(2),
html[data-theme="neon"] main .card:nth-of-type(2), html[data-theme="neon"] main .stat-card:nth-of-type(2),
html[data-theme="aurora"] main .card:nth-of-type(2), html[data-theme="aurora"] main .stat-card:nth-of-type(2),
html[data-theme="sunset"] main .card:nth-of-type(2), html[data-theme="sunset"] main .stat-card:nth-of-type(2) { animation-delay: .06s; }
html:not([data-theme]) main .card:nth-of-type(3), html:not([data-theme]) main .stat-card:nth-of-type(3),
html[data-theme="neon"] main .card:nth-of-type(3), html[data-theme="neon"] main .stat-card:nth-of-type(3),
html[data-theme="aurora"] main .card:nth-of-type(3), html[data-theme="aurora"] main .stat-card:nth-of-type(3),
html[data-theme="sunset"] main .card:nth-of-type(3), html[data-theme="sunset"] main .stat-card:nth-of-type(3) { animation-delay: .12s; }
html:not([data-theme]) main .card:nth-of-type(4), html:not([data-theme]) main .stat-card:nth-of-type(4),
html[data-theme="neon"] main .card:nth-of-type(4), html[data-theme="neon"] main .stat-card:nth-of-type(4),
html[data-theme="aurora"] main .card:nth-of-type(4), html[data-theme="aurora"] main .stat-card:nth-of-type(4),
html[data-theme="sunset"] main .card:nth-of-type(4), html[data-theme="sunset"] main .stat-card:nth-of-type(4) { animation-delay: .18s; }
html:not([data-theme]) main .card:nth-of-type(n+5), html:not([data-theme]) main .stat-card:nth-of-type(n+5),
html[data-theme="neon"] main .card:nth-of-type(n+5), html[data-theme="neon"] main .stat-card:nth-of-type(n+5),
html[data-theme="aurora"] main .card:nth-of-type(n+5), html[data-theme="aurora"] main .stat-card:nth-of-type(n+5),
html[data-theme="sunset"] main .card:nth-of-type(n+5), html[data-theme="sunset"] main .stat-card:nth-of-type(n+5) { animation-delay: .24s; }

/* —— ③ neon 指挥舱：stat 卡右上状态呼吸灯（top:10/right:24 避开切角斜线）—— */
html:not([data-theme]) .stat-card,
html[data-theme="neon"] .stat-card { position: relative; }
html:not([data-theme]) .stat-card::after,
html[data-theme="neon"] .stat-card::after {
    content: '';
    position: absolute; top: 10px; right: 24px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green-glow);
    animation: xyBreathDot 2.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes xyBreathDot {
    0%, 100% { opacity: .35; }
    50%      { opacity: 1; }
}

/* —— ④ aurora 玻璃舱：卡片顶部折射高光边 —— */
html[data-theme="aurora"] .card,
html[data-theme="aurora"] .stat-card,
html[data-theme="aurora"] .section-card {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow-card);
}

/* —— ⑥ sunset 鼠标光晕层（xy-motion.js 挂载）—— */
#xy-glow-follow {
    position: fixed; inset: 0;
    z-index: 0; pointer-events: none;
}

/* —— ⑦ 全皮肤滚动条（neon 终端绿已有，补其余五套）—— */

html[data-theme="light"] ::-webkit-scrollbar { width: 9px; height: 9px; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #eef1f6; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c3ccd9; border-radius: 5px; }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: #0ea5e9; }


html[data-theme="aurora"] ::-webkit-scrollbar { width: 9px; height: 9px; }
html[data-theme="aurora"] ::-webkit-scrollbar-track { background: #0a0f23; }
html[data-theme="aurora"] ::-webkit-scrollbar-thumb { background: rgba(94, 149, 245, 0.30); border-radius: 5px; }
html[data-theme="aurora"] ::-webkit-scrollbar-thumb:hover { background: rgba(140, 170, 255, 0.55); }

html[data-theme="sunset"] ::-webkit-scrollbar { width: 9px; height: 9px; }
html[data-theme="sunset"] ::-webkit-scrollbar-track { background: #1c130e; }
html[data-theme="sunset"] ::-webkit-scrollbar-thumb { background: rgba(255, 159, 67, 0.30); border-radius: 5px; }
html[data-theme="sunset"] ::-webkit-scrollbar-thumb:hover { background: rgba(255, 159, 67, 0.58); }

/* —— ⑧ reduced-motion：关掉本层全部动效 —— */
@media (prefers-reduced-motion: reduce) {
    html:not([data-theme]) main .card, html:not([data-theme]) main .stat-card,
    html[data-theme="neon"] main .card, html[data-theme="neon"] main .stat-card,
    html[data-theme="aurora"] main .card, html[data-theme="aurora"] main .stat-card,
    html[data-theme="sunset"] main .card, html[data-theme="sunset"] main .stat-card,
    html:not([data-theme]) .stat-card::after, html[data-theme="neon"] .stat-card::after,
    .xy-toast-bar { animation: none !important; }
}
