/**
 * 车载安防平台 - App 端样式
 * 版本: V2.0
 * 更新日期: 2026-02-18
 * 适用于移动端 App 原型展示
 */

/* ==================== CSS 变量系统 ==================== */
:root {
    /* 科技蓝主色调 */
    --primary: #0066FF;
    --primary-hover: #3385FF;
    --primary-active: #0052CC;
    --primary-light: #E6F0FF;
    --primary-dark: #003D99;
    
    /* 语义色 */
    --success: #00B578;
    --success-light: #E6F7F1;
    --warning: #FF8F00;
    --warning-light: #FFF8E6;
    --error: #FF4D4F;
    --error-light: #FFF2F0;
    --info: #0066FF;
    --info-light: #E6F0FF;
    
    /* 中性色 */
    --text-primary: #1A1F36;
    --text-secondary: #4E5566;
    --text-tertiary: #6B7280;
    --text-quaternary: #9CA3AF;
    --text-placeholder: #D1D5DB;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --background: #F5F7FA;
    --background-light: #FFFFFF;
    --background-dark: #E5E7EB;
    --white: #FFFFFF;
    
    /* 深色背景 */
    --dark-bg: #0F172A;
    --dark-surface: #1E293B;
    --dark-overlay: rgba(15, 23, 42, 0.95);
    
    /* 科技蓝渐变系统 */
    --gradient-primary: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
    --gradient-secondary: linear-gradient(135deg, #0088FF 0%, #00B4FF 100%);
    --gradient-accent: linear-gradient(135deg, #0066FF 0%, #0099FF 50%, #00D4FF 100%);
    --gradient-success: linear-gradient(135deg, #00B578 0%, #00D68F 100%);
    --gradient-warning: linear-gradient(135deg, #FF8F00 0%, #FFB800 100%);
    --gradient-error: linear-gradient(135deg, #FF4D4F 0%, #FF7875 100%);
    --gradient-dark: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --gradient-glass: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    
    /* 玻璃态 */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* 字体系统 */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 2rem;      /* 32px */
    
    /* 空间系统 (基于 4px 网格) */
    --space-1: 0.25rem;  /* 4px */
    --space-2: 0.5rem;   /* 8px */
    --space-3: 0.75rem;  /* 12px */
    --space-4: 1rem;     /* 16px */
    --space-5: 1.25rem;  /* 20px */
    --space-6: 1.5rem;   /* 24px */
    --space-8: 2rem;     /* 32px */
    --space-10: 2.5rem;  /* 40px */
    --space-12: 3rem;    /* 48px */
    
    /* 阴影系统 */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16), 0 8px 16px rgba(0, 0, 0, 0.06);
    --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.2);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-primary: 0 4px 14px 0 rgba(0, 102, 255, 0.35);
    --shadow-success: 0 4px 14px 0 rgba(0, 181, 120, 0.35);
    --shadow-glow: 0 0 20px rgba(0, 102, 255, 0.25);
    
    /* 圆角系统 */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* 动效时长 */
    --duration-instant: 50ms;
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;
    
    /* 缓动函数 */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* 布局 - 移动端适配 */
    --header-height: 56px;
    --tab-bar-height: 60px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==================== 基础重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== App 容器 ==================== */
.app-wrapper {
    max-width: 414px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--background);
    position: relative;
    overflow-x: hidden;
}

/* 背景装饰 */
.app-wrapper::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== 顶部导航栏 ==================== */
.app-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-4);
    z-index: 100;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--duration-normal) var(--ease-smooth);
}

.app-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.header-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: var(--text-lg);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.header-back:active {
    background: var(--background-dark);
    transform: scale(0.95);
}

.header-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.header-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: var(--text-lg);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-smooth);
    position: relative;
}

.header-icon:active {
    background: var(--background-dark);
    transform: scale(0.95);
}

.header-icon .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--gradient-error);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(255, 65, 108, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==================== 主内容区域 ==================== */
.app-content {
    padding-top: var(--header-height);
    padding-bottom: calc(var(--tab-bar-height) + var(--safe-area-bottom));
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.app-content.no-tab {
    padding-bottom: 0;
}

/* ==================== 底部导航栏 ==================== */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    height: calc(var(--tab-bar-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid var(--border-light);
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) 0;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-smooth);
    position: relative;
}

.tab-item i {
    font-size: 22px;
    transition: all var(--duration-fast) var(--ease-bounce);
}

.tab-item span {
    font-size: var(--text-xs);
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.tab-item.active {
    color: var(--primary);
}

.tab-item.active i {
    transform: scale(1.15);
}

.tab-item.active span {
    font-weight: 600;
}

/* 活跃指示器 */
.tab-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 var(--radius-full) var(--radius-full);
}

.tab-item .tab-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 18px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--gradient-error);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(255, 65, 108, 0.4);
}

/* ==================== 首页头部 - 美化版 ==================== */
.home-header {
    background: var(--gradient-primary);
    padding: var(--space-8) var(--space-4);
    padding-top: calc(var(--space-8) + var(--header-height));
    color: var(--white);
    margin-top: calc(-1 * var(--header-height));
    position: relative;
    overflow: hidden;
}

/* 动态背景装饰 */
.home-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: float 20s ease-in-out infinite;
}

.home-header::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(2deg); }
    50% { transform: translate(0, -20px) rotate(0deg); }
    75% { transform: translate(-10px, -10px) rotate(-2deg); }
}

.home-header .greeting {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin-bottom: var(--space-2);
    position: relative;
    z-index: 1;
}

.home-header .title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-6);
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    position: relative;
    z-index: 1;
}

.home-stat {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.home-stat:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.2);
}

.home-stat .value {
    font-size: var(--text-2xl);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home-stat .label {
    font-size: var(--text-xs);
    opacity: 0.9;
    margin-top: var(--space-1);
    font-weight: 500;
}

/* ==================== 快捷入口 - 美化版 ==================== */
.quick-actions {
    padding: var(--space-6) var(--space-4);
}

.quick-actions .section-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.quick-actions .section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.quick-item:active {
    transform: scale(0.95);
}

.quick-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all var(--duration-normal) var(--ease-bounce);
    position: relative;
    overflow: hidden;
}

/* 图标背景光效 */
.quick-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-smooth);
}

.quick-item:active .quick-icon::before {
    opacity: 1;
}

.quick-icon.blue {
    background: linear-gradient(135deg, #0066FF 0%, #00B4FF 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.35);
}

.quick-icon.green {
    background: linear-gradient(135deg, #00B578 0%, #00D68F 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 181, 120, 0.35);
}

.quick-icon.orange {
    background: linear-gradient(135deg, #FF8F00 0%, #FFB800 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 143, 0, 0.35);
}

.quick-icon.red {
    background: linear-gradient(135deg, #FF4D4F 0%, #FF7875 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 77, 79, 0.35);
}

.quick-icon.cyan {
    background: linear-gradient(135deg, #0088FF 0%, #00D4FF 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 136, 255, 0.35);
}

.quick-icon.light {
    background: linear-gradient(135deg, #E6F0FF 0%, #CCE0FF 100%);
    color: #0066FF;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.2);
}

.quick-item span {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== 卡片组件 - 美化版 ==================== */
.app-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    margin: var(--space-4);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--duration-normal) var(--ease-smooth);
    position: relative;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 255, 0.25), transparent);
}

.app-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-light);
}

.app-card .card-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.app-card .card-title i {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 14px;
}

.app-card .card-more {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.app-card .card-more:active {
    background: var(--background-dark);
    color: var(--primary);
}

.app-card .card-body {
    padding: var(--space-4);
}

/* ==================== 设备卡片 - 美化版 ==================== */
.device-card {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--white);
    border-radius: var(--radius-xl);
    margin: var(--space-3) var(--space-4);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.device-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-success);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-smooth);
}

.device-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.device-card:active::before {
    opacity: 1;
}

.device-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    position: relative;
}

.device-icon.online {
    background: linear-gradient(135deg, #00B578 0%, #00D68F 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 181, 120, 0.3);
}

.device-icon.offline {
    background: linear-gradient(135deg, #FF8F00 0%, #FFB800 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 143, 0, 0.3);
}

.device-icon.error {
    background: linear-gradient(135deg, #FF4D4F 0%, #FF7875 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

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

.device-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.device-plate {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
}

.device-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    margin-top: var(--space-2);
    font-weight: 500;
}

.device-status .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.device-status.online .dot {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.device-status.online {
    color: var(--success);
}

.device-status.offline .dot {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.device-status.offline {
    color: var(--warning);
}

.device-arrow {
    color: var(--text-quaternary);
    font-size: var(--text-sm);
    transition: transform var(--duration-fast) var(--ease-smooth);
}

.device-card:active .device-arrow {
    transform: translateX(4px);
}

/* ==================== 视频播放器 - 美化版 ==================== */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--dark-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-surface) 100%);
    color: var(--white);
}

.video-placeholder i {
    font-size: 56px;
    color: var(--primary);
    margin-bottom: var(--space-4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        opacity: 1; 
        filter: drop-shadow(0 0 10px rgba(24, 144, 255, 0.5));
    }
    50% { 
        opacity: 0.7; 
        filter: drop-shadow(0 0 20px rgba(24, 144, 255, 0.8));
    }
}

.video-placeholder span {
    font-size: var(--text-sm);
    color: var(--text-quaternary);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.video-badge {
    background: rgba(255, 77, 79, 0.95);
    color: var(--white);
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.4);
}

.video-badge i {
    animation: blink 1s infinite;
    font-size: 8px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.video-controls {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background: var(--background-light);
}

.video-btn {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--white);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-bounce);
    box-shadow: var(--shadow-md);
}

.video-btn:active {
    transform: scale(0.92);
}

.video-btn.primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-primary);
}

.video-btn.danger {
    background: var(--gradient-error);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(255, 65, 108, 0.4);
}

/* ==================== 告警列表 - 美化版 ==================== */
.alert-card {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--white);
    border-radius: var(--radius-xl);
    margin: var(--space-3) var(--space-4);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.alert-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.alert-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.alert-icon.high {
    background: linear-gradient(135deg, #FF4D4F 0%, #FF7875 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

.alert-icon.medium {
    background: linear-gradient(135deg, #FF8F00 0%, #FFB800 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 143, 0, 0.3);
}

.alert-icon.low {
    background: linear-gradient(135deg, #0066FF 0%, #00B4FF 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

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

.alert-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.alert-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-1);
}

.alert-time {
    font-size: 11px;
    color: var(--text-quaternary);
}

.alert-action {
    display: flex;
    align-items: center;
}

/* ==================== 控制按钮网格 - 美化版 ==================== */
.control-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    padding: var(--space-4);
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-bounce);
    border: none;
    position: relative;
    overflow: hidden;
}

.control-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-smooth);
}

.control-item:active {
    transform: scale(0.95);
    box-shadow: var(--shadow-md);
}

.control-item:active::before {
    opacity: 1;
}

.control-item i {
    font-size: 32px;
    color: var(--primary);
    transition: all var(--duration-fast) var(--ease-bounce);
}

.control-item span {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

.control-item.active {
    background: linear-gradient(135deg, #0066FF 0%, #00B4FF 100%);
    box-shadow: var(--shadow-primary);
}

.control-item.active i {
    color: var(--white);
}

.control-item.active span {
    color: rgba(255, 255, 255, 0.9);
}

.control-item.primary {
    background: linear-gradient(135deg, #0066FF 0%, #00B4FF 100%);
    box-shadow: var(--shadow-primary);
}

.control-item.primary i {
    color: var(--white);
}

.control-item.primary span {
    color: rgba(255, 255, 255, 0.9);
}

.control-item.danger {
    background: linear-gradient(135deg, #FF4D4F 0%, #FF7875 100%);
    box-shadow: 0 4px 14px rgba(255, 77, 79, 0.4);
}

.control-item.danger i {
    color: var(--white);
}

.control-item.danger span {
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== 地图容器 - 美化版 ==================== */
.map-container {
    position: relative;
    width: calc(100% - var(--space-8));
    height: 300px;
    background: linear-gradient(135deg, #e8f4fc 0%, #d4e9f7 50%, #c4e0f5 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin: var(--space-4);
    box-shadow: var(--shadow-md);
}

.map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.map-placeholder i {
    font-size: 56px;
    color: var(--primary);
    margin-bottom: var(--space-3);
    animation: bounce-light 3s ease-in-out infinite;
}

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

.map-placeholder span {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* ==================== 列表样式 - 美化版 ==================== */
.list-section {
    padding: var(--space-4);
}

.list-section .section-title {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--white);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.list-item:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.list-item-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.list-item-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: var(--text-base);
    color: var(--text-primary);
    font-weight: 600;
}

.list-item-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

.list-item-right {
    color: var(--text-quaternary);
}

/* ==================== 表单组件 - 美化版 ==================== */
.form-section {
    padding: var(--space-4);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--text-base);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.12);
}

/* ==================== 按钮组件 - 美化版 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease-smooth);
}

.btn:active {
    transform: scale(0.97);
}

.btn:active::before {
    opacity: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-primary);
}

.btn-default {
    background: var(--white);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-danger {
    background: var(--gradient-error);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(255, 65, 108, 0.4);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
}

/* ==================== 状态标签 - 美化版 ==================== */
.status-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
}

.status-tag.online {
    background: linear-gradient(135deg, rgba(0, 181, 120, 0.12) 0%, rgba(0, 214, 143, 0.12) 100%);
    color: #00A06A;
}

.status-tag.offline {
    background: linear-gradient(135deg, rgba(255, 143, 0, 0.12) 0%, rgba(255, 184, 0, 0.12) 100%);
    color: #D97706;
}

.status-tag.error {
    background: linear-gradient(135deg, rgba(255, 77, 79, 0.12) 0%, rgba(255, 120, 117, 0.12) 100%);
    color: #DC2626;
}

/* ==================== 用户头像 - 美化版 ==================== */
.avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--text-lg);
    font-weight: 700;
    box-shadow: var(--shadow-primary);
}

.avatar-lg {
    width: 80px;
    height: 80px;
    font-size: var(--text-2xl);
}

/* ==================== 个人中心 - 美化版 ==================== */
.profile-header {
    background: var(--gradient-primary);
    padding: var(--space-10) var(--space-4);
    padding-top: calc(var(--space-10) + var(--header-height));
    text-align: center;
    color: var(--white);
    margin-top: calc(-1 * var(--header-height));
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -30%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: float 15s ease-in-out infinite;
}

.profile-header .avatar-lg {
    margin: 0 auto var(--space-5);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-header .name {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-1);
    position: relative;
    z-index: 1;
}

.profile-header .phone {
    font-size: var(--text-sm);
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* ==================== 空状态 - 美化版 ==================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-10) var(--space-4);
    text-align: center;
}

.empty-state i {
    font-size: 72px;
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-5);
}

.empty-state .title {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.empty-state .desc {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-quaternary);
    border-radius: var(--radius-full);
}

/* ==================== 工具类 ==================== */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-muted { color: var(--text-tertiary); }

.bg-white { background: var(--white); }
.bg-light { background: var(--background-light); }

.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }

.p-4 { padding: var(--space-4); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ==================== 动画效果 ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fadeIn { animation: fadeIn var(--duration-normal) var(--ease-smooth); }
.animate-slideUp { animation: slideUp var(--duration-normal) var(--ease-out); }
.animate-slideDown { animation: slideDown var(--duration-normal) var(--ease-out); }
.animate-scaleIn { animation: scaleIn var(--duration-normal) var(--ease-bounce); }

/* 页面进入动画 */
.app-content {
    animation: fadeIn var(--duration-slow) var(--ease-smooth);
}

/* 卡片交错动画 */
.app-card:nth-child(1) { animation: slideUp var(--duration-slow) var(--ease-out); }
.app-card:nth-child(2) { animation: slideUp var(--duration-slow) var(--ease-out) 50ms both; }
.app-card:nth-child(3) { animation: slideUp var(--duration-slow) var(--ease-out) 100ms both; }
.app-card:nth-child(4) { animation: slideUp var(--duration-slow) var(--ease-out) 150ms both; }

/* 快捷入口动画 */
.quick-item {
    animation: scaleIn var(--duration-slow) var(--ease-bounce);
}

.quick-item:nth-child(1) { animation-delay: 0ms; }
.quick-item:nth-child(2) { animation-delay: 50ms; }
.quick-item:nth-child(3) { animation-delay: 100ms; }
.quick-item:nth-child(4) { animation-delay: 150ms; }
