/**
 * 民爆运输车辆调度系统 - 主样式文件
 * 设计风格：科技感、未来感
 */

/* ========================================
   CSS变量定义
======================================== */
:root {
    /* 主色调 */
    --primary-color: #00f5ff;
    --primary-dark: #0080ff;
    --primary-light: #00ffff;
    
    /* 辅助色 */
    --secondary-color: #00ff88;
    --accent-color: #ff6b35;
    --warning-color: #ffb800;
    --danger-color: #ff4757;
    --success-color: #00ff88;
    
    /* 背景色 */
    --bg-dark: #0a0e17;
    --bg-darker: #050810;
    --bg-card: rgba(15, 25, 45, 0.85);
    --bg-card-hover: rgba(20, 35, 60, 0.95);
    
    /* 边框色 */
    --border-color: rgba(0, 245, 255, 0.15);
    --border-glow: rgba(0, 245, 255, 0.4);
    
    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #00f5ff 0%, #0080ff 100%);
    --gradient-secondary: linear-gradient(135deg, #00f5ff 0%, #00ff88 100%);
    --gradient-card: linear-gradient(145deg, rgba(15, 25, 45, 0.9) 0%, rgba(10, 15, 30, 0.95) 100%);
    
    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(0, 245, 255, 0.3);
    
    /* 尺寸 */
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    
    /* 字体 */
    --font-primary: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-tech: 'Orbitron', monospace;
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   基础样式重置
======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   背景动效
======================================== */
.tech-theme {
    position: relative;
}

.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   侧边栏
======================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--gradient-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    backdrop-filter: blur(20px);
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 35px;
    height: 35px;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

.sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.logo-text {
    font-family: var(--font-tech);
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-left: 62px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-list {
    list-style: none;
    padding: 0 12px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 245, 255, 0.08);
}

.nav-link.active {
    color: var(--primary-color);
    background: rgba(0, 245, 255, 0.12);
    box-shadow: inset 0 0 20px rgba(0, 245, 255, 0.1);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--gradient-secondary);
    border-radius: 0 2px 2px 0;
}

.nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-text {
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: rgba(0, 245, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.user-avatar svg {
    width: 24px;
    height: 24px;
}

.user-details {
    flex: 1;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.logout-btn:hover {
    color: var(--danger-color);
    border-color: var(--danger-color);
    background: rgba(255, 71, 87, 0.1);
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   主内容区
======================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: rgba(10, 14, 23, 0.9);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 30px;
    z-index: 50;
    backdrop-filter: blur(20px);
}

.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.sidebar-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.sidebar-toggle svg {
    width: 22px;
    height: 22px;
}

.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumb .separator {
    margin: 0 8px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-time {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 245, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-tech);
    font-size: 0.85rem;
    color: var(--primary-color);
}

.current-time svg {
    width: 16px;
    height: 16px;
    animation: spin 60s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 内容区域 */
.content-wrapper {
    flex: 1;
    padding: 30px;
}

/* ========================================
   面板样式
======================================== */
.panel {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 245, 255, 0.02);
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.title-icon {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.panel-body {
    padding: 24px;
}

/* ========================================
   统计卡片
======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

/* 仪表盘统计卡片容器 */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-secondary);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon.vehicles {
    background: rgba(0, 245, 255, 0.15);
    color: var(--primary-color);
}

.stat-icon.personnel {
    background: rgba(0, 255, 136, 0.15);
    color: var(--secondary-color);
}

.stat-icon.tasks {
    background: rgba(255, 184, 0, 0.15);
    color: var(--warning-color);
}

.stat-icon.dispatch {
    background: rgba(0, 128, 255, 0.15);
    color: var(--primary-dark);
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-value {
    font-family: var(--font-tech);
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-unit {
    font-family: var(--font-tech);
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 4px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.stat-footer {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.stat-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.idle { background: var(--secondary-color); }
.dot.busy { background: var(--primary-dark); }
.dot.pending { background: #b366ff; }
.dot.driver { background: var(--primary-color); }
.dot.escort { background: var(--secondary-color); }
.dot.executing { background: var(--primary-dark); }
.dot.completed { background: var(--success-color); }

/* ========================================
   数据表格
======================================== */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 245, 255, 0.03);
}

.data-table tr:hover td {
    background: rgba(0, 245, 255, 0.03);
}

.data-table td {
    font-size: 0.95rem;
}

/* 空数据 */
.empty-data {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    color: var(--text-muted);
    opacity: 0.5;
}

.empty-icon svg {
    width: 100%;
    height: 100%;
}

.empty-data p {
    color: var(--text-muted);
}

/* 状态徽章 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.status-0,
.status-badge.status-idle {
    background: rgba(255, 184, 0, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(255, 184, 0, 0.3);
}

.status-badge.status-1,
.status-badge.status-busy {
    background: rgba(0, 128, 255, 0.15);
    color: var(--primary-dark);
    border: 1px solid rgba(0, 128, 255, 0.3);
}

.status-badge.status-pending {
    background: rgba(138, 43, 226, 0.15);
    color: #b366ff;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.status-badge.status-2 {
    background: rgba(0, 255, 136, 0.15);
    color: var(--secondary-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* 类型徽章 */
.type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.type-badge.type-1 {
    background: rgba(0, 245, 255, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(0, 245, 255, 0.3);
}

.type-badge.type-2 {
    background: rgba(0, 255, 136, 0.15);
    color: var(--secondary-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

/* 周期徽章 */
.cycle-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* 车牌号 */
.plate-number {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-tech);
    font-size: 0.9rem;
    color: var(--primary-color);
    letter-spacing: 1px;
}

/* 任务单据号 */
.task-no {
    font-family: var(--font-tech);
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* 身份证号 */
.id-card {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* 操作按钮 */
.action-btns {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.action-btns .btn-sm {
    padding: 6px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.action-btns .btn-sm svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ========================================
   按钮样式
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-primary);
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--bg-dark);
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-glow);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: rgba(0, 245, 255, 0.1);
}

.btn-danger {
    background: rgba(255, 71, 87, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.25);
}

.btn-success {
    background: rgba(0, 255, 136, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.btn-success:hover {
    background: rgba(0, 255, 136, 0.25);
}

/* ========================================
   表单样式
======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label.required::after {
    content: '*';
    color: var(--danger-color);
}

.label-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
}

.input-wrapper input:hover,
.input-wrapper select:hover,
.input-wrapper textarea:hover {
    border-color: var(--border-glow);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15), 0 0 20px rgba(0, 245, 255, 0.1);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.08) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.input-wrapper select {
    cursor: pointer;
}

.input-wrapper select option {
    background: #ffffff;
    color: #1a1a2e;
    padding: 12px;
    font-weight: 500;
}

.input-wrapper select option:hover,
.input-wrapper select option:focus,
.input-wrapper select option:checked {
    background: #e8f4f8;
    color: #0066cc;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper.readonly input {
    background: rgba(0, 245, 255, 0.05);
    cursor: not-allowed;
}

/* 搜索输入框 */
.search-input-wrapper input {
    padding: 10px 14px 10px 40px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    width: 250px;
}

.search-input-wrapper input:hover {
    border-color: var(--border-glow);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15), 0 0 15px rgba(0, 245, 255, 0.1);
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}

/* Textarea 样式 */
.input-wrapper textarea,
textarea.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    resize: vertical;
    transition: all var(--transition-normal);
}

.input-wrapper textarea:hover,
textarea.form-textarea:hover {
    border-color: var(--border-glow);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.05) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.input-wrapper textarea:focus,
textarea.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15), 0 0 20px rgba(0, 245, 255, 0.1);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.08) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.input-wrapper textarea::placeholder,
textarea.form-textarea::placeholder {
    color: var(--text-muted);
}

.input-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius-sm);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.input-wrapper input:focus ~ .input-glow {
    opacity: 1;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
}

.form-hint {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 日期输入框样式 */
input[type="date"],
input[type="datetime-local"],
input[type="time"] {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8) sepia(1) saturate(5) hue-rotate(150deg);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition-normal);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* 下拉选择框 */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 12px 40px 12px 16px;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    width: 100%;
}

.select-wrapper select:hover {
    border-color: var(--border-glow);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.08) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15), 0 0 20px rgba(0, 245, 255, 0.1);
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.select-wrapper select option {
    background: #ffffff;
    color: #1a1a2e;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
}

.select-wrapper select option:hover,
.select-wrapper select option:focus,
.select-wrapper select option:checked {
    background: #e8f4f8;
    color: #0066cc;
}

.select-wrapper select option:disabled {
    background: #f5f5f5;
    color: #999999;
}

.select-wrapper select option:hover,
.select-wrapper select option:checked {
    background: rgba(0, 245, 255, 0.15);
    color: var(--primary-color);
}

.select-wrapper select option:disabled {
    color: var(--text-muted);
}

.select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    pointer-events: none;
    transition: transform var(--transition-normal);
}

.select-wrapper:focus-within .select-icon {
    transform: translateY(-50%) rotate(180deg);
}

/* 搜索输入框 */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-input-wrapper input {
    padding-left: 40px;
    width: 250px;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 10px 36px 10px 14px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300f5ff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-select:hover {
    border-color: var(--border-glow);
    background-color: rgba(0, 245, 255, 0.05);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15);
}

.form-select option {
    background: #ffffff;
    color: #1a1a2e;
    padding: 10px 14px;
    font-weight: 500;
}

.form-select option:hover,
.form-select option:focus,
.form-select option:checked {
    background: #e8f4f8;
    color: #0066cc;
}

/* 表单网格 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* 错误消息 */
.error-message {
    padding: 16px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: var(--border-radius-sm);
    color: var(--danger-color);
    font-size: 0.9rem;
    margin-top: 20px;
    display: none;
}

.error-message.show {
    display: block;
}

/* ========================================
   页面工具栏
======================================== */
.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ========================================
   模态框
======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(5px);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(-20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

.modal.modal-lg {
    max-width: 700px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.modal-close:hover {
    color: var(--danger-color);
    background: rgba(255, 71, 87, 0.1);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

/* 确认对话框 */
.confirm-modal .modal-body {
    text-align: center;
    padding: 40px 24px;
}

.confirm-modal .modal-body p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ========================================
   Toast提示
======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: rgba(0, 255, 136, 0.3);
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error {
    border-color: rgba(255, 71, 87, 0.3);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.info {
    border-color: rgba(0, 245, 255, 0.3);
}

.toast.info .toast-icon {
    color: var(--primary-color);
}

.toast.warning {
    border-color: rgba(255, 184, 0, 0.3);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

/* Toast 关闭按钮 */
.toast-close {
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all var(--transition-fast);
    padding: 0;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.toast-close svg {
    width: 14px;
    height: 14px;
}

/* Toast 进度条 */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 0 var(--border-radius-sm);
    animation: progressShrink linear forwards;
}

.toast.success .toast-progress {
    background: var(--success-color);
}

.toast.error .toast-progress {
    background: var(--danger-color);
}

.toast.warning .toast-progress {
    background: var(--warning-color);
}

.toast.info .toast-progress {
    background: var(--primary-color);
}

@keyframes progressShrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Toast 加载状态 */
.toast.loading {
    border-color: rgba(0, 245, 255, 0.3);
}

.toast.loading .toast-icon {
    animation: spin 1s linear infinite;
}

.toast.loading .toast-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 245, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Toast 退出动画 */
.toast.hiding {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ========================================
   登录页面
======================================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    width: 420px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-secondary);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    margin-bottom: 20px;
}

.logo-svg {
    width: 80px;
    height: 80px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-title {
    font-family: var(--font-tech);
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .input-wrapper input {
    padding-left: 50px;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: color var(--transition-normal);
}

.input-wrapper input:focus ~ .input-icon {
    color: var(--primary-color);
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--gradient-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    box-shadow: 0 0 40px rgba(0, 245, 255, 0.5);
}

.login-btn.loading {
    pointer-events: none;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-footer .copyright {
    margin-top: 4px;
    font-size: 0.75rem;
}

/* 浮动装饰 */
.floating-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 10s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: var(--primary-color);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: var(--secondary-color);
    bottom: 20%;
    right: 15%;
    animation-delay: -3s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    background: var(--primary-dark);
    top: 50%;
    right: 30%;
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.login-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    pointer-events: none;
}

.deco-line {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(0, 245, 255, 0.1);
    border-radius: 50%;
    animation: expand 4s ease-in-out infinite;
}

.deco-line-1 {
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
}

.deco-line-2 {
    width: 350px;
    height: 350px;
    margin: -175px 0 0 -175px;
    animation-delay: 0.5s;
}

.deco-line-3 {
    width: 500px;
    height: 500px;
    margin: -250px 0 0 -250px;
    animation-delay: 1s;
}

@keyframes expand {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

/* ========================================
   调度页面特定样式
======================================== */
.dispatch-panel .panel-body {
    padding: 30px;
}

.dispatch-form .form-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* 调度页面下拉菜单增强样式 */
.dispatch-form .select-wrapper {
    position: relative;
}

.dispatch-form .select-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.dispatch-form .select-wrapper:focus-within::before {
    opacity: 1;
}

.dispatch-form .select-wrapper select {
    background-image: none;
}

.dispatch-form .select-wrapper select:not(:placeholder-shown) {
    border-color: var(--border-glow);
}

/* 下拉菜单选项高亮 */
.dispatch-form .select-wrapper select option {
    background: #ffffff;
    color: #1a1a2e;
    padding: 14px 16px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
}

.dispatch-form .select-wrapper select option:hover,
.dispatch-form .select-wrapper select option:focus,
.dispatch-form .select-wrapper select option:checked {
    background: #e8f4f8;
    color: #0066cc;
}

/* 下拉箭头动画 */
.dispatch-form .select-icon {
    transition: all var(--transition-normal);
}

.dispatch-form .select-wrapper:focus-within .select-icon {
    transform: translateY(-50%) rotate(180deg);
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.info-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.info-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
}

.info-icon.warning {
    background: rgba(255, 184, 0, 0.15);
    color: var(--warning-color);
}

.info-icon.info {
    background: rgba(0, 245, 255, 0.15);
    color: var(--primary-color);
}

.info-icon svg {
    width: 24px;
    height: 24px;
}

.info-content h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.info-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   设置页面
======================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.setting-panel .panel-body {
    padding: 30px;
}

.setting-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.setting-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    background: rgba(0, 245, 255, 0.1);
    color: var(--primary-color);
}

.setting-icon svg {
    width: 30px;
    height: 30px;
}

.setting-info {
    flex: 1;
}

.setting-info h4 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.setting-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.setting-form .form-group {
    margin-bottom: 16px;
}

.system-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-value {
    font-size: 0.95rem;
    font-family: var(--font-tech);
    color: var(--primary-color);
}

/* ========================================
   使用指南
======================================== */
.guide-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
}

.guide-item:hover {
    border-color: var(--border-glow);
}

.guide-item.warning {
    background: rgba(255, 184, 0, 0.05);
    border-color: rgba(255, 184, 0, 0.2);
}

.guide-number {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--bg-dark);
    font-weight: 700;
    border-radius: 50%;
}

.guide-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 184, 0, 0.15);
    color: var(--warning-color);
    border-radius: 50%;
}

.guide-icon svg {
    width: 20px;
    height: 20px;
}

.guide-content h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.guide-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========================================
   详情展示
======================================== */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-value {
    font-size: 1rem;
}

/* ========================================
   记录数显示
======================================== */
.record-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.refresh-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.refresh-info svg {
    width: 16px;
    height: 16px;
}

.refresh-info svg.spin {
    animation: spin 2s linear infinite;
}

/* ========================================
   加载动画
======================================== */
.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ========================================
   响应式设计
======================================== */

/* 桌面端默认隐藏移动端元素 */
.mobile-task-list {
    display: none;
}

@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dispatch-form .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1200px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .system-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .dispatch-form .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 20px;
    }
    
    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }
    
    .search-form {
        flex-wrap: wrap;
    }
    
    .search-input-wrapper input {
        width: 100%;
    }
    
    .login-box {
        width: 90%;
        max-width: 400px;
        padding: 30px;
    }
    
    .system-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 0 16px;
    }
    
    .header-title h1 {
        font-size: 1.2rem;
    }
    
    .current-time {
        display: none;
    }
    
    .panel-body {
        padding: 16px;
    }
    
    .action-btns {
        flex-direction: column;
    }
}
