/* ================================================
   主页面 / 仪表盘 专属样式 (v2.0  三栏大屏风格)
   铁路与新能源时空耦合不平衡谐波追踪系统
   ================================================ */

/* ---- 全局重置补充 ---- */
html, body {
    height: 100%;
    overflow: hidden;
}

/* ================================================
   顶部标题栏
   ================================================ */
.sys-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px 0 20px;
    background: linear-gradient(90deg, #020e1e 0%, #031525 25%, #031828 65%, #020e1e 100%);
    border-bottom: 1px solid transparent;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5), 0 0 80px rgba(34,211,238,0.05);
}
.sys-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(34,211,238,0.05) 5%, rgba(34,211,238,0.6) 28%, rgba(96,165,250,0.75) 50%, rgba(34,211,238,0.6) 72%, rgba(34,211,238,0.05) 95%, transparent 100%);
    pointer-events: none;
}

.sys-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.header-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(34,211,238,0.5), 0 0 4px rgba(34,211,238,0.2);
    border: 1px solid rgba(34,211,238,0.3);
    flex-shrink: 0;
}
.header-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.sys-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(90deg, #bae6fd 0%, #7dd3fc 25%, #22d3ee 55%, #a5f3fc 85%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(34,211,238,0.35));
}

/* 导航按钮组 */
.sys-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    background: rgba(34,211,238,0.05);
    border: 1px solid rgba(34,211,238,0.17);
    border-radius: 7px;
    color: #93c5e8;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    letter-spacing: 0.3px;
}

.nav-btn:hover {
    background: rgba(34,211,238,0.11);
    border-color: rgba(34,211,238,0.48);
    color: #e0f2fe;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(34,211,238,0.15), 0 0 0 1px rgba(34,211,238,0.08);
}

.nav-btn-danger {
    background: rgba(244,63,94,0.08);
    border-color: rgba(244,63,94,0.28);
    color: #f43f5e;
}
.nav-btn-danger:hover {
    background: rgba(244,63,94,0.18);
    border-color: rgba(244,63,94,0.55);
    color: #fda4af;
    box-shadow: 0 4px 14px rgba(244,63,94,0.2);
}

/* 角色欢迎通知条 */
.welcome-banner {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
body.preview-active .welcome-banner { top: 108px; }
.welcome-banner[hidden] { display: none !important; }
.welcome-banner.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.welcome-banner.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
}
.welcome-banner.role-admin {
    background: linear-gradient(135deg, rgba(6,20,48,0.92) 0%, rgba(5,30,35,0.92) 100%);
    border: 1px solid rgba(16,185,129,0.45);
    color: #6ee7b7;
    box-shadow: 0 4px 30px rgba(16,185,129,0.18), 0 0 0 1px rgba(16,185,129,0.1);
}
.welcome-banner.role-admin .wb-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #34d399; flex-shrink: 0;
}
.welcome-banner.role-enterprise {
    background: linear-gradient(135deg, rgba(6,20,48,0.92) 0%, rgba(20,8,46,0.92) 100%);
    border: 1px solid rgba(168,85,247,0.45);
    color: #ddd6fe;
    box-shadow: 0 4px 30px rgba(168,85,247,0.18), 0 0 0 1px rgba(168,85,247,0.1);
}
.welcome-banner.role-enterprise .wb-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(168,85,247,0.15);
    border: 1px solid rgba(168,85,247,0.35);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #c084fc; flex-shrink: 0;
}
.welcome-banner .wb-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 1px;
}
.welcome-banner .wb-text small {
    font-size: 11px;
    opacity: 0.65;
    font-weight: 400;
}

/* 企业账号管理按钮 */
.nav-btn-ent {
    background: rgba(168,85,247,0.08);
    border-color: rgba(168,85,247,0.3);
    color: #c084fc;
}
.nav-btn-ent[hidden] { display: none !important; }
.nav-btn-ent:hover {
    background: rgba(168,85,247,0.18);
    border-color: rgba(168,85,247,0.6);
    color: #e9d5ff;
    box-shadow: 0 4px 14px rgba(168,85,247,0.2);
}

/* ============================================
   企业账号管理弹窗
   ============================================ */
#ent-profile-modal.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2200;
    backdrop-filter: blur(4px);
}
#ent-profile-modal[hidden] { display: none !important; }

.ent-modal-box {
    background: linear-gradient(145deg, #0a1628 0%, #0d1f3c 100%);
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 16px;
    width: min(480px, 96vw);
    box-shadow: 0 0 60px rgba(168,85,247,0.12), 0 20px 60px rgba(0,0,0,0.6);
    animation: entBoxIn 0.28s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;
}
@keyframes entBoxIn {
    from { opacity: 0; transform: scale(0.88) translateY(-20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.ent-modal-box .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid rgba(168,85,247,0.18);
}
.ent-modal-box .modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #c084fc;
    letter-spacing: .04em;
}
.ent-modal-box .modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.45);
    font-size: 1.35rem;
    line-height: 1;
    padding: 0 4px;
    transition: color .18s;
}
.ent-modal-box .modal-close-btn:hover { color: #c084fc; }

.ent-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 12px 22px;
    background: rgba(168,85,247,0.06);
    border-bottom: 1px solid rgba(168,85,247,0.12);
    font-size: .82rem;
    color: rgba(255,255,255,0.65);
}

.ent-tabs {
    display: flex;
    gap: 0;
    padding: 14px 22px 0;
}
.ent-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255,255,255,0.5);
    font-size: .9rem;
    padding: 6px 16px;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.ent-tab.active {
    color: #c084fc;
    border-bottom-color: #c084fc;
}
.ent-tab:hover { color: #e9d5ff; }

.ent-tab-panel {
    padding: 20px 22px 22px;
}
.form-group-ent {
    margin-bottom: 14px;
}
.ent-label {
    display: block;
    font-size: .82rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 5px;
}
.ent-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(168,85,247,0.28);
    border-radius: 7px;
    color: #e2e8f0;
    font-size: .92rem;
    padding: 8px 12px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    box-sizing: border-box;
}
.ent-input:focus {
    border-color: rgba(168,85,247,0.7);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}
.ent-form-error {
    font-size: .8rem;
    color: #f87171;
    min-height: 18px;
    margin-bottom: 8px;
}
.ent-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: .95rem;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    transition: opacity .18s, box-shadow .18s;
    box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}
.ent-submit-btn:hover    { opacity: .88; box-shadow: 0 6px 20px rgba(124,58,237,0.45); }
.ent-submit-btn:disabled { opacity: .5; cursor: not-allowed; }

.toggle-switch {
    display: inline-block;
    width: 24px;
    height: 14px;
    background: rgba(34,211,238,0.2);
    border: 1px solid rgba(34,211,238,0.4);
    border-radius: 7px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    vertical-align: middle;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 1px; left: 2px;
    width: 10px; height: 10px;
    background: #22d3ee;
    border-radius: 50%;
    transition: transform 0.2s;
}
.toggle-switch.active {
    background: rgba(34,211,238,0.5);
}
.toggle-switch.active::after {
    transform: translateX(10px);
}

.header-time {
    font-size: 13px;
    font-family: var(--font-mono);
    color: #22d3ee;
    letter-spacing: 1px;
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}

/* ================================================
   主容器（三栏网格）
   ================================================ */
.main-container {
    display: grid;
    grid-template-columns: 270px 1fr 290px;
    grid-template-rows: calc(100vh - 60px);
    margin-top: 60px;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* ================================================
   左侧面板
   ================================================ */
.left-panel {
    background: linear-gradient(180deg, #041224 0%, #051628 60%, #041224 100%);
    border-right: 1px solid rgba(34,211,238,0.13);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ================================================
   中央面板
   ================================================ */
.center-panel {
    display: flex;
    flex-direction: column;
    background: #041323;
    border-left: 1px solid rgba(34,211,238,0.1);
    border-right: 1px solid rgba(34,211,238,0.1);
    overflow: hidden;
}

/* ================================================
   右侧面板
   ================================================ */
.right-panel {
    background: linear-gradient(180deg, #041224 0%, #051628 60%, #041224 100%);
    border-left: 1px solid rgba(34,211,238,0.13);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ================================================
   通用 Panel Card
   ================================================ */
.panel-card {
    background: linear-gradient(160deg,
        rgba(10,26,60,0.97) 0%,
        rgba(6,17,46,0.95) 50%,
        rgba(5,14,38,0.97) 100%);
    border: 1px solid rgba(34,211,238,0.32);
    border-radius: 10px;
    padding: 12px 13px;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow:
        0 0 0 1px rgba(34,211,238,0.05),
        0 4px 24px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(34,211,238,0.12),
        inset 0 0 40px rgba(34,211,238,0.03);
}
/* 左上角亮边 */
.panel-card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    width: 36px; height: 36px;
    border-top: 2px solid rgba(34,211,238,0.9);
    border-left: 2px solid rgba(34,211,238,0.9);
    border-radius: 10px 0 0 0;
    pointer-events: none;
    filter: drop-shadow(0 0 3px rgba(34,211,238,0.5));
}
/* 右下角暗边 */
.panel-card::after {
    content: '';
    position: absolute;
    bottom: -1px; right: -1px;
    width: 36px; height: 36px;
    border-bottom: 2px solid rgba(34,211,238,0.45);
    border-right: 2px solid rgba(34,211,238,0.45);
    border-radius: 0 0 10px 0;
    pointer-events: none;
}
.panel-card:hover {
    border-color: rgba(34,211,238,0.48);
    box-shadow:
        0 0 0 1px rgba(34,211,238,0.08),
        0 6px 32px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(34,211,238,0.2),
        inset 0 0 60px rgba(34,211,238,0.05),
        0 0 20px rgba(34,211,238,0.08);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    padding-bottom: 8px;
    background-image: linear-gradient(90deg, rgba(34,211,238,0.22) 0%, rgba(96,165,250,0.15) 45%, transparent 100%);
    background-size: 100% 1px;
    background-position: bottom;
    background-repeat: no-repeat;
}

.card-header-icon {
    width: 24px; height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.card-header-icon.blue   { background: rgba(59,130,246,0.2);  color: #60a5fa; box-shadow: 0 0 8px rgba(59,130,246,0.3); }
.card-header-icon.green  { background: rgba(16,185,129,0.2);  color: #34d399; box-shadow: 0 0 8px rgba(16,185,129,0.3); }
.card-header-icon.cyan   { background: rgba(34,211,238,0.18); color: #22d3ee; box-shadow: 0 0 8px rgba(34,211,238,0.3); }
.card-header-icon.orange { background: rgba(251,146,60,0.2);  color: #fb923c; box-shadow: 0 0 8px rgba(251,146,60,0.3); }

.card-title {
    font-size: 13px;
    font-weight: 700;
    color: #d0e8ff;
    flex: 1;
    letter-spacing: 0.8px;
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34,197,94,0.6);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%,100% { box-shadow: 0 0 6px rgba(34,197,94,0.6); }
    50% { box-shadow: 0 0 12px rgba(34,197,94,0.9); }
}

.card-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(100,116,139,0.2);
    border: 1px solid rgba(100,116,139,0.3);
    color: #94a3b8;
}
.card-badge.online {
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.3);
    color: #22c55e;
}
.card-badge.warning-badge {
    background: rgba(251,191,36,0.12);
    border-color: rgba(251,191,36,0.3);
    color: #fbbf24;
}
.card-badge.danger-badge {
    background: rgba(244,63,94,0.12);
    border-color: rgba(244,63,94,0.3);
    color: #f43f5e;
}

/* ================================================
   系统信息网格
   ================================================ */
.sys-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 8px;
    background: rgba(10,24,60,0.65);
    border-radius: 7px;
    border: 1px solid rgba(34,211,238,0.1);
    min-width: 0;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.info-item:hover {
    background: rgba(14,30,72,0.8);
    border-color: rgba(34,211,238,0.25);
}

.info-icon {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
}
.info-icon.blue-ring   { border: 1px solid rgba(96,165,250,0.5);  color: #60a5fa; background: rgba(59,130,246,0.12);  box-shadow: 0 0 8px rgba(59,130,246,0.2); }
.info-icon.orange-ring { border: 1px solid rgba(251,146,60,0.5);  color: #fb923c; background: rgba(251,146,60,0.12);  box-shadow: 0 0 8px rgba(251,146,60,0.2); }
.info-icon.purple-ring { border: 1px solid rgba(167,139,250,0.5); color: #a78bfa; background: rgba(139,92,246,0.12);  box-shadow: 0 0 8px rgba(139,92,246,0.2); }
.info-icon.cyan-ring   { border: 1px solid rgba(34,211,238,0.5);  color: #22d3ee; background: rgba(34,211,238,0.12);  box-shadow: 0 0 8px rgba(34,211,238,0.2); }
.info-icon.green-ring  { border: 1px solid rgba(52,211,153,0.5);  color: #34d399; background: rgba(16,185,129,0.12);  box-shadow: 0 0 8px rgba(16,185,129,0.2); }

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

.info-label {
    font-size: 10px;
    color: #6b8aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 13px;
    font-weight: 700;
    color: #d0e8ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.info-value.green { color: #22c55e; }
.info-value.mono  { font-family: var(--font-mono); font-size: 11px; }
.info-value.small { font-size: 10px; }
.info-value .unit { font-size: 9px; color: #5a7898; font-weight: 400; margin-left: 1px; }
.text-green { color: #22c55e; }

/* 进度条组件 */
.info-bar-wrap {
    height: 3px;
    background: rgba(15,25,55,0.9);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}
.info-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}
.info-bar.bar-orange { background: linear-gradient(90deg, #fb923c, #f59e0b); box-shadow: 0 0 4px rgba(251,146,60,0.7); }
.info-bar.bar-purple { background: linear-gradient(90deg, #a78bfa, #818cf8); box-shadow: 0 0 4px rgba(167,139,250,0.7); }
.info-bar.bar-green  { background: linear-gradient(90deg, #34d399, #22c55e); box-shadow: 0 0 4px rgba(52,211,153,0.7); }
.info-bar.bar-cyan   { background: linear-gradient(90deg, #22d3ee, #38bdf8); box-shadow: 0 0 4px rgba(34,211,238,0.7); }

/* ================================================
   监测结果
   ================================================ */
.monitor-list {
    list-style: none;
    margin-bottom: 8px;
}

.monitor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 5px;
    border-bottom: 1px solid rgba(34,211,238,0.06);
    gap: 6px;
    border-radius: 4px;
    transition: background 0.15s;
}
.monitor-item:hover { background: rgba(34,211,238,0.04); }
.monitor-item:last-child { border-bottom: none; }

.monitor-label {
    font-size: 11px;
    color: #5a7898;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}
.monitor-label i { width: 12px; text-align: center; opacity: 0.9; }

.monitor-value {
    font-size: 12px;
    font-weight: 700;
    color: #c8e0f8;
}
.monitor-value.mono { font-family: var(--font-mono); font-size: 11px; }
.monitor-value.lvl-warn     { color: #fbbf24; }
.monitor-value.lvl-alarm    { color: #fb923c; }
.monitor-value.lvl-critical { color: #f87171; animation: pulse-text 1.2s infinite; }
@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}

.monitor-btns {
    display: flex;
    gap: 6px;
}

.btn-monitor {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}
.btn-monitor::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 55%);
    pointer-events: none;
}

.btn-monitor.start {
    background: linear-gradient(135deg, #064e36 0%, #065f46 55%, #047857 100%);
    color: #6ee7b7;
    border: 1px solid rgba(52,211,153,0.4);
    box-shadow: 0 2px 14px rgba(16,185,129,0.2);
}
.btn-monitor.start:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    border-color: rgba(52,211,153,0.65);
    box-shadow: 0 4px 20px rgba(52,211,153,0.35);
    transform: translateY(-1px);
}
.btn-monitor.start.active {
    background: linear-gradient(135deg, #14532d, #166534);
    border-color: #22c55e;
    box-shadow: 0 0 20px rgba(34,197,94,0.4);
    animation: monitorPulse 2.5s infinite;
}

.btn-monitor.stop {
    background: linear-gradient(135deg, #6b1515 0%, #7f1d1d 55%, #991b1b 100%);
    color: #fca5a5;
    border: 1px solid rgba(244,63,94,0.4);
    box-shadow: 0 2px 14px rgba(244,63,94,0.2);
}
.btn-monitor.stop:hover {
    background: linear-gradient(135deg, #991b1b 0%, #b91c1c 100%);
    border-color: rgba(244,63,94,0.65);
    box-shadow: 0 4px 20px rgba(244,63,94,0.35);
    transform: translateY(-1px);
}
.btn-monitor:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

@keyframes monitorPulse {
    0%,100% { box-shadow: 0 0 14px rgba(34,197,94,0.35); }
    50% { box-shadow: 0 0 22px rgba(34,197,94,0.6); }
}

/* ================================================
   地图区域
   ================================================ */
.map-wrapper {
    flex: 1;
    position: relative;
    min-height: 0;
    background: #020c1f;
    overflow: hidden;
    /* 流光边框容器层 */
    isolation: isolate;
}

/* 四边流光边框 */
.map-flow-border {
    position: absolute;
    inset: 0;
    z-index: 502;
    pointer-events: none;
    border-radius: 0;
}
/* 上边→ */
.map-flow-border::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(34,211,238,0.0) 10%,
        rgba(34,211,238,0.9) 50%,
        rgba(34,211,238,0.0) 90%,
        transparent 100%);
    filter: drop-shadow(0 0 6px rgba(34,211,238,0.95)) drop-shadow(0 0 12px rgba(34,211,238,0.5));
    animation: flowTop 4s linear infinite;
}
/* 下边← */
.map-flow-border::after {
    content: '';
    position: absolute;
    bottom: 0; right: -100%;
    width: 60%; height: 2px;
    background: linear-gradient(270deg,
        transparent 0%,
        rgba(56,189,248,0.0) 10%,
        rgba(56,189,248,0.9) 50%,
        rgba(56,189,248,0.0) 90%,
        transparent 100%);
    filter: drop-shadow(0 0 6px rgba(56,189,248,0.95)) drop-shadow(0 0 12px rgba(56,189,248,0.5));
    animation: flowBottom 4s linear infinite 2s;
}
/* 左边↓ */
.map-flow-left {
    position: absolute;
    inset: 0;
    z-index: 502;
    pointer-events: none;
}
.map-flow-left::before {
    content: '';
    position: absolute;
    left: 0; top: -100%;
    width: 2px; height: 60%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(34,211,238,0.0) 10%,
        rgba(34,211,238,0.9) 50%,
        rgba(34,211,238,0.0) 90%,
        transparent 100%);
    filter: drop-shadow(0 0 6px rgba(34,211,238,0.95)) drop-shadow(0 0 12px rgba(34,211,238,0.5));
    animation: flowLeft 4s linear infinite 1s;
}
/* 右边↑ */
.map-flow-left::after {
    content: '';
    position: absolute;
    right: 0; bottom: -100%;
    width: 2px; height: 60%;
    background: linear-gradient(0deg,
        transparent 0%,
        rgba(56,189,248,0.0) 10%,
        rgba(56,189,248,0.9) 50%,
        rgba(56,189,248,0.0) 90%,
        transparent 100%);
    filter: drop-shadow(0 0 6px rgba(56,189,248,0.95)) drop-shadow(0 0 12px rgba(56,189,248,0.5));
    animation: flowRight 4s linear infinite 3s;
}

@keyframes flowTop    { from { left: -60%; } to { left: 100%; } }
@keyframes flowBottom { from { right: -60%; } to { right: 100%; } }
@keyframes flowLeft   { from { top: -60%; } to { top: 100%; } }
@keyframes flowRight  { from { bottom: -60%; } to { bottom: 100%; } }
/* 左上角框 */
.map-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 60px; height: 60px;
    border-top: 2px solid rgba(34,211,238,0.9);
    border-left: 2px solid rgba(34,211,238,0.9);
    z-index: 501;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(34,211,238,0.6));
}
/* 右下角框 */
.map-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 60px; height: 60px;
    border-bottom: 2px solid rgba(34,211,238,0.9);
    border-right: 2px solid rgba(34,211,238,0.9);
    z-index: 501;
    pointer-events: none;
    filter: drop-shadow(0 0 4px rgba(34,211,238,0.6));
}
/* 右上角框 */
.map-corner-tr {
    position: absolute;
    top: 0; right: 0;
    width: 60px; height: 60px;
    border-top: 2px solid rgba(34,211,238,0.5);
    border-right: 2px solid rgba(34,211,238,0.5);
    z-index: 501;
    pointer-events: none;
}
/* 左下角框 */
.map-corner-bl {
    position: absolute;
    bottom: 0; left: 0;
    width: 60px; height: 60px;
    border-bottom: 2px solid rgba(34,211,238,0.5);
    border-left: 2px solid rgba(34,211,238,0.5);
    z-index: 501;
    pointer-events: none;
}

/* 顶部科技感状态栏 */
.map-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 30px;
    z-index: 500;
    background: linear-gradient(90deg,
        rgba(1,6,18,0.95) 0%,
        rgba(2,10,26,0.88) 40%,
        rgba(2,10,26,0.88) 60%,
        rgba(1,6,18,0.95) 100%);
    border-bottom: 1px solid rgba(34,211,238,0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    backdrop-filter: blur(6px);
    pointer-events: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.map-topbar-left {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-left: 52px;
}
.map-topbar-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(34,211,238,0.7);
    letter-spacing: 1.8px;
    font-family: var(--font-mono);
    text-transform: uppercase;
}
.map-live-dot {
    width: 7px; height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34,197,94,0.9);
    animation: livePulse 2s infinite;
    flex-shrink: 0;
}
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 6px rgba(34,197,94,0.8); }
    50%       { box-shadow: 0 0 16px rgba(34,197,94,1), 0 0 28px rgba(34,197,94,0.4); }
}
.map-topbar-right {
    display: flex;
    align-items: center;
    gap: 5px;
}
.map-coord {
    font-size: 10px;
    font-family: var(--font-mono);
    color: rgba(34,211,238,0.55);
    letter-spacing: 0.8px;
}

/* 扫描线动画 */
.map-scan-line {
    position: absolute;
    top: 30px; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(34,211,238,0.04) 15%,
        rgba(34,211,238,0.45) 50%,
        rgba(34,211,238,0.04) 85%,
        transparent 100%);
    z-index: 400;
    pointer-events: none;
    animation: mapScan 8s linear infinite;
    box-shadow: 0 0 6px rgba(34,211,238,0.25);
}
@keyframes mapScan {
    0%   { top: 30px;            opacity: 0; }
    4%   {                        opacity: 1; }
    94%  {                        opacity: 0.5; }
    100% { top: calc(100% - 1px); opacity: 0; }
}

#map {
    width: 100%;
    height: 100%;
}

/* ── 数字孪生：点阵网格覆盖层 ── */
.map-dot-grid {
    position: absolute;
    inset: 0;
    z-index: 403;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(34,211,238,0.28) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0;
    animation: dtGridIn 2.5s ease forwards 0.8s;
}
@keyframes dtGridIn { to { opacity: 0.38; } }

/* ── 数字孪生：暗角聚焦 ── */
.map-vignette {
    position: absolute;
    inset: 0;
    z-index: 404;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 80% at 50% 50%,
        transparent 35%,
        rgba(1,6,18,0.55) 75%,
        rgba(1,6,18,0.82) 100%);
}

/* ── 科技蓝色调叠加层 ── */
.map-tint {
    position: absolute;
    inset: 0;
    z-index: 405;
    pointer-events: none;
    background: rgba(6, 80, 180, 0.18);
    mix-blend-mode: screen;
}

/* ── 数字孪生：Canvas 动画引擎 ──
   z-index 由 Leaflet 自定义 pane 管理（dtCanvas pane = 450），
   确保 canvas 在 overlay-pane(400) 之上、marker-pane(600)/popup-pane(700) 之下 */
#dt-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
}

/* 地图瓦片深色科技风格（仅对标准图层） */
.leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(1.05) contrast(0.92) saturate(1.05);
    transition: filter 0.35s ease;
}
/* 切换卫星图时恢复原色 */
.map-satellite .leaflet-tile-pane {
    filter: none;
}

/* Leaflet 深色模式微调 */
.leaflet-container {
    background: #020c1f !important;
}

/* Leaflet 缩放控件 */
.leaflet-control-zoom {
    border: 1px solid rgba(34,211,238,0.35) !important;
    border-radius: 7px !important;
    overflow: hidden;
    box-shadow: 0 0 14px rgba(34,211,238,0.12), 0 4px 16px rgba(0,0,0,0.5) !important;
}
.leaflet-control-zoom a {
    background: rgba(1,8,22,0.92) !important;
    color: #22d3ee !important;
    border-bottom: 1px solid rgba(34,211,238,0.2) !important;
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(34,211,238,0.14) !important;
    color: #ffffff !important;
}
.leaflet-control-zoom-out {
    border-bottom: none !important;
}

/* Leaflet 比例尺控件 */
.leaflet-control-scale {
    margin-bottom: 18px !important;
    margin-right: 12px !important;
}
.leaflet-control-scale-line {
    background: rgba(1,8,22,0.88) !important;
    border: 1px solid rgba(34,211,238,0.35) !important;
    border-top: none !important;
    border-radius: 0 0 4px 4px !important;
    color: rgba(34,211,238,0.8) !important;
    font-size: 9px !important;
    font-family: var(--font-mono) !important;
    letter-spacing: 0.5px !important;
    padding: 1px 6px 2px !important;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 0 8px rgba(34,211,238,0.1);
    backdrop-filter: blur(4px);
}

/* Leaflet attribution 隐藏 */
.leaflet-control-attribution {
    display: none !important;
}

.map-legend {
    position: absolute;
    bottom: 14px; left: 14px;
    z-index: 500;
    background: rgba(2,8,22,0.92);
    border: 1px solid rgba(34,211,238,0.22);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 1px rgba(34,211,238,0.3);
}

.legend-title {
    font-size: 10px;
    color: rgba(34,211,238,0.6);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(34,211,238,0.1);
    margin-bottom: 1px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #7db5d8;
}

.legend-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-dot.red   { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.8); }
.legend-dot.green { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.8); }

/* 拓扑线路 Popup 科技风格 */
.dt-topo-popup .leaflet-popup-content-wrapper {
    background: rgba(1, 10, 28, 0.95) !important;
    border: 1px solid rgba(34,211,238,0.35) !important;
    border-radius: 6px !important;
    box-shadow: 0 0 18px rgba(34,211,238,0.18), 0 4px 20px rgba(0,0,0,0.6) !important;
    backdrop-filter: blur(8px);
    color: #cbd5e1 !important;
}
.dt-topo-popup .leaflet-popup-tip {
    background: rgba(1, 10, 28, 0.95) !important;
    border: 1px solid rgba(34,211,238,0.25) !important;
}
.dt-topo-popup .leaflet-popup-close-button {
    color: rgba(34,211,238,0.55) !important;
    font-size: 16px !important;
}
.dt-topo-popup .leaflet-popup-close-button:hover {
    color: #22d3ee !important;
}

.map-alarm-badge {
    position: absolute;
    top: 40px; right: 10px;
    z-index: 500;
    background: rgba(254,100,0,0.15);
    border: 1px solid rgba(254,100,0,0.5);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: #fb923c;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    animation: blink 1.4s infinite;
}

/* ================================================
   系统概述
   ================================================ */
.sys-overview {
    background: linear-gradient(180deg, rgba(4,13,32,0.97) 0%, rgba(5,15,36,0.94) 100%);
    border-top: 1px solid rgba(34,211,238,0.13);
    padding: 10px 16px 10px;
    flex-shrink: 0;
}

.overview-header {
    font-size: 12px;
    font-weight: 700;
    color: rgba(34,211,238,0.85);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    letter-spacing: 0.5px;
}
.overview-badge {
    margin-left: auto;
    font-size: 9px;
    font-weight: 600;
    color: rgba(34,211,238,0.4);
    font-family: var(--font-mono);
    letter-spacing: 1px;
    border: 1px solid rgba(34,211,238,0.15);
    padding: 1px 7px;
    border-radius: 3px;
}

.overview-text {
    font-size: 11px;
    color: #5a7294;
    line-height: 1.65;
    margin-bottom: 9px;
}

.overview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.overview-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: opacity 0.2s;
}
.overview-tag:hover { opacity: 0.8; }
.overview-tag i { font-size: 9px; }
.overview-tag.cyan   { background: rgba(34,211,238,0.09);  color: #22d3ee; border: 1px solid rgba(34,211,238,0.22); }
.overview-tag.blue   { background: rgba(96,165,250,0.09);  color: #60a5fa; border: 1px solid rgba(96,165,250,0.22); }
.overview-tag.orange { background: rgba(251,146,60,0.09);  color: #fb923c; border: 1px solid rgba(251,146,60,0.22); }
.overview-tag.green  { background: rgba(16,185,129,0.09);  color: #34d399; border: 1px solid rgba(16,185,129,0.22); }
.overview-tag.purple { background: rgba(167,139,250,0.09); color: #a78bfa; border: 1px solid rgba(167,139,250,0.22); }
.overview-tag.yellow { background: rgba(251,191,36,0.09);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.22); }

.hl {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.hl-bold {
    color: #fbbf24;
    font-weight: 700;
}

.center-footer {
    text-align: center;
    font-size: 10px;
    color: #3a5570;
    padding: 6px 16px 8px;
    border-top: 1px solid rgba(34,211,238,0.05);
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.center-footer .footer-brand-sm {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 3px;
    background: linear-gradient(90deg, #7dd3fc 0%, #22d3ee 50%, #a5f3fc 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: footer-shimmer 5s linear infinite;
}

/* ================================================
   图表公用
   ================================================ */
.chart-legend-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: #64748b;
    margin-bottom: 5px;
}

.legend-line {
    display: inline-block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
}
.legend-line.blue-line { background: #3b82f6; }
.legend-line.cyan-line { background: #22d3ee; }

.chart-wrap {
    height: 100px;
    position: relative;
    background: rgba(2,7,20,0.5);
    border-radius: 6px;
    padding: 4px;
    border: 1px solid rgba(34,211,238,0.07);
}
.chart-wrap.short { height: 78px; }

/* ================================================
   谐波分析统计
   ================================================ */
.harmonic-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 7px;
}

.hstat {
    background: linear-gradient(145deg, rgba(6,16,40,0.88) 0%, rgba(8,20,50,0.8) 100%);
    border-radius: 6px;
    padding: 5px 7px;
    border: 1px solid rgba(34,211,238,0.12);
    transition: border-color 0.2s;
}
.hstat:hover { border-color: rgba(34,211,238,0.25); }

.hstat-label {
    font-size: 9px;
    color: #4e6888;
    display: block;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hstat-value {
    font-size: 14px;
    font-weight: 700;
    color: #d0e8ff;
    letter-spacing: 0.5px;
}
.hstat-value.cyan { color: #22d3ee; text-shadow: 0 0 10px rgba(34,211,238,0.4); }

/* ================================================
   社会经济效益
   ================================================ */
.eco-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.eco-item {
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(145deg, rgba(6,16,40,0.88) 0%, rgba(8,20,50,0.8) 100%);
    border-radius: 7px;
    padding: 5px 8px;
    border: 1px solid rgba(34,211,238,0.12);
    transition: border-color 0.2s, transform 0.2s;
}
.eco-item:hover {
    border-color: rgba(34,211,238,0.22);
    transform: translateY(-1px);
}

.eco-icon {
    width: 26px; height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}
.eco-icon.red    { background: rgba(239,68,68,0.14);  color: #f87171; box-shadow: 0 0 8px rgba(239,68,68,0.2); }
.eco-icon.orange { background: rgba(251,146,60,0.14); color: #fb923c; box-shadow: 0 0 8px rgba(251,146,60,0.2); }
.eco-icon.cyan   { background: rgba(34,211,238,0.14); color: #22d3ee; box-shadow: 0 0 8px rgba(34,211,238,0.2); }
.eco-icon.green  { background: rgba(16,185,129,0.14); color: #34d399; box-shadow: 0 0 8px rgba(16,185,129,0.2); }
.eco-icon.green2 { background: rgba(134,239,172,0.14);color: #86efac; box-shadow: 0 0 8px rgba(134,239,172,0.2); }
.eco-icon.blue   { background: rgba(96,165,250,0.14); color: #60a5fa; box-shadow: 0 0 8px rgba(96,165,250,0.2); }

.eco-data {
    flex: 1;
    min-width: 0;
}

.eco-val {
    font-size: 12px;
    font-weight: 700;
    color: #d0e8ff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eco-lbl {
    font-size: 9px;
    color: #4e6888;
    margin-top: 1px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* ================================================
   Toast 通知
   ================================================ */
#toast-container {
    position: fixed;
    top: 66px;
    right: 16px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: rgba(8,20,52,0.95);
    border: 1px solid rgba(34,211,238,0.25);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    min-width: 220px;
    max-width: 300px;
    animation: toastIn 0.3s ease;
    backdrop-filter: blur(8px);
}
.toast.success { border-color: rgba(34,197,94,0.35); }
.toast.success i { color: #22c55e; }
.toast.error { border-color: rgba(244,63,94,0.35); }
.toast.error i { color: #f43f5e; }
.toast.warning { border-color: rgba(251,191,36,0.35); }
.toast.warning i { color: #fbbf24; }

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

/* ================================================
   AI 助手浮动按钮
   ================================================ */
.ai-fab {
    position: fixed;
    bottom: 20px; right: 20px;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0e4c82, #1279c4);
    border: 1px solid rgba(34,211,238,0.35);
    color: #22d3ee;
    font-size: 17px;
    cursor: pointer;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(34,211,238,0.22);
    transition: all 0.2s ease;
}
.ai-fab:hover {
    background: linear-gradient(135deg, #1279c4, #22d3ee);
    box-shadow: 0 0 20px rgba(34,211,238,0.4);
    transform: scale(1.05);
}

/* ================================================
   自定义 Leaflet 图标颜色
   ================================================ */
.marker-traction {
    background: #ef4444;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(239,68,68,0.8);
}
.marker-res {
    background: #22c55e;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 6px rgba(34,197,94,0.8);
}
.marker-alarm {
    background: #f59e0b;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 3px solid #fbbf24;
    box-shadow: 0 0 12px rgba(245,158,11,0.9);
    animation: markerPulse 1.5s infinite;
}
@keyframes markerPulse {
    0%,100% { box-shadow: 0 0 12px rgba(245,158,11,0.9); transform: scale(1); }
    50% { box-shadow: 0 0 22px rgba(245,158,11,1); transform: scale(1.15); }
}

/* ================================================
   系统锁定遮罩
   ================================================ */
.sys-lockdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(2,11,30,0.93);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lockFadeIn 0.4s ease;
}
@keyframes lockFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.lockdown-card {
    background: linear-gradient(145deg, #0a1628 0%, #0d1f3c 100%);
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 18px;
    padding: 48px 56px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 0 60px rgba(239,68,68,0.15), 0 20px 60px rgba(0,0,0,0.6);
    animation: lockCardIn 0.45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes lockCardIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.lockdown-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(239,68,68,0.12);
    border: 2px solid rgba(239,68,68,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: #ef4444;
    animation: lockIconPulse 2s infinite;
}
.lockdown-icon.maintenance {
    background: rgba(96,165,250,0.12);
    border-color: rgba(96,165,250,0.4);
    color: #60a5fa;
    animation: none;
}
.lockdown-icon.warning {
    background: rgba(251,191,36,0.12);
    border-color: rgba(251,191,36,0.4);
    color: #fbbf24;
}
@keyframes lockIconPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
    50%      { box-shadow: 0 0 0 12px rgba(239,68,68,0);  }
}
.lockdown-title {
    font-size: 20px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.lockdown-status {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    padding: 4px 18px;
    border-radius: 999px;
    margin-bottom: 14px;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}
.lockdown-status.maintenance { background: rgba(96,165,250,0.15); color:#60a5fa; border-color:rgba(96,165,250,0.3); }
.lockdown-status.warning      { background: rgba(251,191,36,0.15); color:#fbbf24; border-color:rgba(251,191,36,0.3); }
.lockdown-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 28px;
}
.lockdown-logout-btn {
    background: rgba(239,68,68,0.12);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.lockdown-logout-btn:hover {
    background: rgba(239,68,68,0.25);
    box-shadow: 0 0 14px rgba(239,68,68,0.25);
}

/* 滚动条美化（侧边面板） */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar { width: 4px; }
.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track { background: transparent; }
.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: rgba(34,211,238,0.2);
    border-radius: 2px;
}

/* ================================================
   预览模式顶部标识条
   ================================================ */
.preview-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 300;
    height: 36px;
    background: linear-gradient(90deg, rgba(245,158,11,0.22) 0%, rgba(251,191,36,0.14) 100%);
    border-bottom: 1px solid rgba(251,191,36,0.38);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    font-size: .84rem;
    color: #fbbf24;
}
.preview-banner[hidden] { display: none !important; }

.preview-countdown {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #f59e0b;
    background: rgba(251,191,36,0.15);
    border: 1px solid rgba(251,191,36,0.3);
    padding: 1px 10px;
    border-radius: 6px;
    letter-spacing: 0.06em;
    min-width: 56px;
    text-align: center;
    transition: color 0.3s;
}

.preview-exit-btn {
    margin-left: auto;
    background: rgba(251,191,36,0.12);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.35);
    border-radius: 7px;
    padding: 3px 14px;
    font-size: .8rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.preview-exit-btn:hover {
    background: rgba(251,191,36,0.28);
    box-shadow: 0 0 10px rgba(251,191,36,0.2);
}

/* 预览激活时将 header 与主容器整体下移 36px */
body.preview-active .sys-header {
    top: 36px;
}
body.preview-active .main-container {
    margin-top: calc(60px + 36px);
}

/* ================================================
   站点标记扩展：谐波告警等级——仅改光晕/边框，不覆写基础颜色
   ================================================ */
.marker-traction.lvl0 { box-shadow: 0 0 6px rgba(239,68,68,0.7); }
.marker-traction.lvl1 { box-shadow: 0 0 10px rgba(250,204,21,0.9); border-color: #fbbf24; }
.marker-traction.lvl2 { box-shadow: 0 0 16px rgba(249,115,22,1);  border-color: #f97316; }
.marker-traction.lvl3 { box-shadow: 0 0 22px rgba(220,38,38,1);   border-color: #dc2626; animation: markerPulse 1.5s infinite; }
.marker-res.lvl0 { box-shadow: 0 0 6px rgba(34,197,94,0.7); }
.marker-res.lvl1 { box-shadow: 0 0 10px rgba(250,204,21,0.9); border-color: #fbbf24; }
.marker-res.lvl2 { box-shadow: 0 0 16px rgba(249,115,22,1);  border-color: #f97316; }
.marker-res.lvl3 { box-shadow: 0 0 22px rgba(220,38,38,1);   border-color: #dc2626; animation: markerPulse 1.5s infinite; }

/* 谐波源水波纹动画 */
.mrw {
    position: relative;
    width: 50px; height: 50px;
}
.mrw-dot {
    position: absolute;
    top: 50%; left: 50%;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(239,68,68,0.9);
    transform: translate(-50%, -50%);
    z-index: 2;
}
.mrw-ring {
    position: absolute;
    top: 50%; left: 50%;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(var(--rc, 249,115,22), 0.85);
    transform: translate(-50%, -50%);
    animation: rippleWave var(--dur, 2.1s) ease-out infinite;
    animation-delay: var(--delay, 0s);
}
@keyframes rippleWave {
    0%   { width: 12px; height: 12px; opacity: .9; border-width: 2px; }
    80%  { width: var(--maxw, 46px); height: var(--maxw, 46px); opacity: 0;  border-width: 1px; }
    100% { width: var(--maxw, 46px); height: var(--maxw, 46px); opacity: 0;  border-width: 1px; }
}

/* 地图扫描线激活态 */
.map-scan-line.active {
    animation: scanline 3s linear infinite;
}

/* ================================================
   通用弹窗基础
   ================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 5, 18, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease both;
}
.modal-overlay[hidden] {
    display: none;
}
.modal-box {
    width: 100%;
    max-width: 720px;
    background: rgba(7, 15, 44, 0.94);
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: var(--radius-lg);
    padding: 26px 30px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.60),
                0 0 40px rgba(99,102,241,0.08),
                inset 0 1px 0 rgba(255,255,255,0.07);
    animation: fadeSlideUp 0.25s ease both;
    position: relative;
    overflow-y: auto;
    max-height: 90vh;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(34,211,238,0.1);
}
.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-title i {
    color: var(--color-primary, #22d3ee);
    font-size: 16px;
}
.modal-close-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.modal-close-btn:hover {
    color: #e2e8f0;
    background: rgba(255,255,255,0.06);
}

/* ---- 算法选择弹窗 ---- */
.algo-modal-box {
    max-width: 560px;
    width: 95%;
}
.algo-modal-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 16px;
    line-height: 1.6;
}
.algo-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}
.algo-loading {
    text-align: center;
    color: #64748b;
    padding: 24px 0;
    font-size: 13px;
}
.algo-loading.text-red { color: #ef4444; }
.algo-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(30,64,175,0.05);
    border: 1px solid rgba(34,211,238,0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.algo-card:hover {
    background: rgba(34,211,238,0.07);
    border-color: rgba(34,211,238,0.3);
}
.algo-card.selected {
    background: rgba(34,211,238,0.12);
    border-color: rgba(34,211,238,0.6);
    box-shadow: 0 0 16px rgba(34,211,238,0.15);
}
.algo-card-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(34,211,238,0.1);
    border: 1px solid rgba(34,211,238,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #22d3ee;
    flex-shrink: 0;
}
.algo-card.selected .algo-card-icon {
    background: rgba(34,211,238,0.2);
}
.algo-card-body { flex: 1; min-width: 0; }
.algo-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 3px;
}
.algo-card-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
}
.algo-card-check {
    font-size: 18px;
    color: rgba(34,211,238,0.2);
    transition: color 0.2s;
}
.algo-card.selected .algo-card-check { color: #22d3ee; }
.algo-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid rgba(34,211,238,0.08);
}
.algo-confirm-btn {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}
.algo-confirm-btn:disabled {
    background: rgba(51,65,85,0.6);
    color: #475569;
    cursor: not-allowed;
}
.algo-confirm-btn:not(:disabled):hover {
    box-shadow: 0 0 20px rgba(34,211,238,0.4);
    transform: translateY(-1px);
}

/* ---- 站点详情弹窗 ---- */
.station-detail-box {
    max-width: 520px;
    width: 95%;
}
.sd-overview {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    align-items: flex-start;
}
.sd-info-col { flex: 1; }
.sd-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}
.sd-label { color: #64748b; min-width: 52px; flex-shrink: 0; }
.sd-value { color: #cbd5e1; }
.sd-value.bold { font-weight: 600; color: #e2e8f0; font-size: 13px; }
.sd-value.mono { font-family: 'Courier New', monospace; font-size: 11px; }
.sd-thd-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.sd-thd-ring {
    position: relative;
    width: 80px; height: 80px;
}
.sd-thd-svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.sd-ring-bg {
    fill: none;
    stroke: rgba(34,211,238,0.08);
    stroke-width: 5;
}
.sd-ring-fill {
    fill: none;
    stroke: #22d3ee;
    stroke-width: 5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease;
}
.sd-thd-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.sd-thd-val {
    font-size: 16px;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1;
}
.sd-thd-unit { font-size: 9px; color: #64748b; }
.sd-alarm-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.sd-alarm-badge.alarm-badge-ok       { background: rgba(34,197,94,0.12);  color: #22c55e; }
.sd-alarm-badge.alarm-badge-warn     { background: rgba(251,191,36,0.12); color: #fbbf24; }
.sd-alarm-badge.alarm-badge-alarm    { background: rgba(249,115,22,0.12); color: #f97316; }
.sd-alarm-badge.alarm-badge-critical { background: rgba(239,68,68,0.12);  color: #ef4444; }
.sd-source-tag {
    font-size: 10px;
    color: #ef4444;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 20px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: sourcePulse 1.5s infinite;
}
.sd-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}
.sd-metric {
    background: rgba(15,23,42,0.5);
    border: 1px solid rgba(34,211,238,0.08);
    border-radius: 7px;
    padding: 6px 8px;
    text-align: center;
}
.sd-m-lbl { display: block; font-size: 9px; color: #475569; margin-bottom: 3px; }
.sd-m-val { display: block; font-size: 12px; font-weight: 600; color: #cbd5e1; font-family: 'Courier New', monospace; }
.sd-m-val.small { font-size: 10px; }
.sd-spectrum-wrap { border-top: 1px solid rgba(34,211,238,0.08); padding-top: 10px; }
.sd-chart-title { font-size: 11px; color: #64748b; margin-bottom: 6px; }

/* ---- 历史记录弹窗 ---- */
.history-modal-box {
    max-width: 820px;
    width: 98%;
}
.history-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 12px;
}
.history-table-wrap {
    overflow-x: auto;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.history-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid rgba(34,211,238,0.1);
    white-space: nowrap;
}
.history-table td {
    padding: 7px 10px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(51,65,85,0.3);
    white-space: nowrap;
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: rgba(34,211,238,0.03); }
.table-loading { text-align: center; color: #475569; padding: 20px !important; }
.table-loading.text-red { color: #ef4444; }
.tbl-time { color: #64748b; font-size: 11px; }
.mono { font-family: 'Courier New', monospace; }
.thd-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.thd-chip.lvl0 { background: rgba(34,197,94,0.1);  color: #22c55e; }
.thd-chip.lvl1 { background: rgba(251,191,36,0.1); color: #fbbf24; }
.thd-chip.lvl2 { background: rgba(249,115,22,0.1); color: #f97316; }
.thd-chip.lvl3 { background: rgba(239,68,68,0.1);  color: #ef4444; }
.alarm-level-tag {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.alarm-level-tag.lvl0 { background: rgba(34,197,94,0.1);  color: #22c55e; }
.alarm-level-tag.lvl1 { background: rgba(251,191,36,0.1); color: #fbbf24; }
.alarm-level-tag.lvl2 { background: rgba(249,115,22,0.1); color: #f97316; }
.alarm-level-tag.lvl3 { background: rgba(239,68,68,0.1);  color: #ef4444; }

/* ---- 报警设置弹窗 ---- */
.alarm-modal-box {
    max-width: 640px;
    width: 96%;
}
.alarm-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(34,211,238,0.1);
}
.alarm-tab {
    padding: 7px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}
.alarm-tab:hover { color: #94a3b8; }
.alarm-tab.active {
    color: #22d3ee;
    border-bottom-color: #22d3ee;
}
.alarm-tab-panel { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform: none; } }

.threshold-table-wrap { overflow-x: auto; margin-bottom: 14px; }
.threshold-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.threshold-table th {
    padding: 7px 10px;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid rgba(34,211,238,0.1);
    text-align: left;
    white-space: nowrap;
}
.threshold-table td {
    padding: 6px 10px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(51,65,85,0.2);
}
.th-input {
    background: rgba(15,23,42,0.7);
    border: 1px solid rgba(34,211,238,0.18);
    border-radius: 5px;
    color: #e2e8f0;
    padding: 3px 7px;
    font-size: 12px;
    transition: border-color 0.2s;
}
.th-input:focus {
    outline: none;
    border-color: rgba(34,211,238,0.5);
}
.alarm-save-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}
.alarm-save-btn {
    background: linear-gradient(135deg, #0ea5e9, #22d3ee);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.alarm-save-btn:hover {
    box-shadow: 0 0 16px rgba(34,211,238,0.35);
    transform: translateY(-1px);
}
.notify-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.notify-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(15,23,42,0.4);
    border: 1px solid rgba(34,211,238,0.07);
    border-radius: 8px;
    flex-wrap: wrap;
}
.notify-name {
    font-size: 12px;
    color: #94a3b8;
    min-width: 80px;
    font-weight: 500;
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #64748b;
    user-select: none;
}
.toggle-label input[type="checkbox"] { cursor: pointer; accent-color: #22d3ee; }
.toggle-desc { color: #64748b; }
.alarm-email-test-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 10px 4px;
    flex-wrap: wrap;
}

/* ---- 视觉报警闪烁遮罩 ---- */
.alarm-flash-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: all;
    display: none;
    align-items: center;
    justify-content: center;
}
.alarm-flash-overlay:not([hidden]) {
    display: flex;
}
/* 等级叠加背景 */
.alarm-flash-overlay.lvl-overlay-1 { background: rgba(251,191,36,0.07); }
.alarm-flash-overlay.lvl-overlay-2 { background: rgba(249,115,22,0.09); }
.alarm-flash-overlay.lvl-overlay-3 { background: rgba(239,68,68,0.10);  }
.alarm-flash-overlay.flashing.lvl-overlay-1 {
    animation: alarmFlash1 0.6s ease infinite;
}
.alarm-flash-overlay.flashing.lvl-overlay-2 {
    animation: alarmFlash2 0.5s ease infinite;
}
.alarm-flash-overlay.flashing.lvl-overlay-3 {
    animation: alarmFlash3 0.4s ease infinite;
}
@keyframes alarmFlash1 {
    0%,100% { background: rgba(251,191,36,0.04); }
    50%      { background: rgba(251,191,36,0.16); }
}
@keyframes alarmFlash2 {
    0%,100% { background: rgba(249,115,22,0.05); }
    50%      { background: rgba(249,115,22,0.22); }
}
@keyframes alarmFlash3 {
    0%,100% { background: rgba(239,68,68,0.06);  }
    50%      { background: rgba(239,68,68,0.28);  }
}
.alarm-flash-content {
    background: linear-gradient(145deg, #1a0d06, #2d1b0a);
    border: 2px solid rgba(239,68,68,0.6);
    border-radius: 18px;
    padding: 32px 48px 28px;
    text-align: center;
    min-width: 320px;
    max-width: 480px;
    box-shadow: 0 0 60px rgba(239,68,68,0.25);
    animation: alarmBoxPulse3 0.8s ease infinite;
    pointer-events: all;
}
.alarm-flash-content.lvl-1 {
    background: linear-gradient(145deg, #1a1500, #2a2000);
    border-color: rgba(251,191,36,0.7);
    box-shadow: 0 0 50px rgba(251,191,36,0.2);
    animation: alarmBoxPulse1 1.0s ease infinite;
}
.alarm-flash-content.lvl-2 {
    background: linear-gradient(145deg, #1a0e00, #2d1c08);
    border-color: rgba(249,115,22,0.7);
    box-shadow: 0 0 55px rgba(249,115,22,0.22);
    animation: alarmBoxPulse2 0.9s ease infinite;
}
.alarm-flash-content.lvl-3 {
    background: linear-gradient(145deg, #1a0a0a, #2d1010);
    border-color: rgba(239,68,68,0.7);
    box-shadow: 0 0 60px rgba(239,68,68,0.28);
    animation: alarmBoxPulse3 0.8s ease infinite;
}
@keyframes alarmBoxPulse1 {
    0%,100% { box-shadow: 0 0 30px rgba(251,191,36,0.15); }
    50%      { box-shadow: 0 0 70px rgba(251,191,36,0.40); }
}
@keyframes alarmBoxPulse2 {
    0%,100% { box-shadow: 0 0 35px rgba(249,115,22,0.18); }
    50%      { box-shadow: 0 0 75px rgba(249,115,22,0.45); }
}
@keyframes alarmBoxPulse3 {
    0%,100% { box-shadow: 0 0 40px rgba(239,68,68,0.20); }
    50%      { box-shadow: 0 0 80px rgba(239,68,68,0.50); }
}
/* 告警等级徽章 */
.alarm-level-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    text-transform: uppercase;
}
.alarm-level-badge.lvl-1 {
    background: rgba(251,191,36,0.18);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.45);
}
.alarm-level-badge.lvl-2 {
    background: rgba(249,115,22,0.18);
    color: #f97316;
    border: 1px solid rgba(249,115,22,0.45);
}
.alarm-level-badge.lvl-3 {
    background: rgba(239,68,68,0.18);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.45);
}
/* 告警图标 */
.alarm-flash-icon {
    font-size: 44px;
    margin-bottom: 12px;
    display: block;
    animation: alarmIconBounce 0.4s ease infinite alternate;
}
.lvl-1 .alarm-flash-icon { color: #fbbf24; }
.lvl-2 .alarm-flash-icon { color: #f97316; }
.lvl-3 .alarm-flash-icon { color: #ef4444; }
@keyframes alarmIconBounce {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}
/* 站点名 */
.alarm-flash-station {
    font-size: 18px;
    font-weight: 800;
    color: #e2e8f0;
    margin-bottom: 4px;
    min-height: 22px;
}
/* THD 数值 */
.alarm-flash-thd {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}
.lvl-1 .alarm-flash-thd { color: #fbbf24; }
.lvl-2 .alarm-flash-thd { color: #f97316; }
.lvl-3 .alarm-flash-thd { color: #ef4444; }
#alarm-flash-text {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
}
/* 时间 */
.alarm-flash-time {
    font-size: 11px;
    color: #475569;
    margin-bottom: 14px;
    font-variant-numeric: tabular-nums;
}
/* 倒计时 */
.alarm-countdown-wrap {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 14px;
    padding: 5px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 20px;
    display: inline-block;
}
#alarm-countdown-num {
    font-weight: 700;
    color: #94a3b8;
}
/* 确认按钮 */
.alarm-dismiss-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.07);
    color: #e2e8f0;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    padding: 9px 32px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.alarm-dismiss-btn:hover {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.35);
}
.lvl-1 .alarm-dismiss-btn { border-color: rgba(251,191,36,0.4); color: #fbbf24; }
.lvl-2 .alarm-dismiss-btn { border-color: rgba(249,115,22,0.4); color: #f97316; }
.lvl-3 .alarm-dismiss-btn { border-color: rgba(239,68,68,0.4);  color: #ef4444; }