/* 基础样式重置和全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-pressed: #5a6fd8;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --text: #1d1d1f;
    --muted: #6c757d;
    --surface: rgba(255, 255, 255, 0.95);
    --divider: #e5e5e7;
    --glass-border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: #1e293b;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* 全局动画效果 */
@keyframes softFadeUp {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

/* 顶部导航栏 */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 0 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: inherit;
    animation: logoSlideIn 0.6s ease-out;
}

@keyframes logoSlideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    animation: actionsSlideIn 0.6s ease-out 0.2s both;
}

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

.toggle-sidebar-btn {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-sidebar-btn:hover {
    background: rgba(110, 142, 251, 0.08);
    border-color: rgba(110, 142, 251, 0.2);
}

.admin-info {
    font-size: 14px;
    opacity: 0.9;
    color: var(--muted);
}

.logout-btn {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 260px;
    height: calc(100vh - 60px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.nav-menu ul {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    margin-bottom: 4px;
    opacity: 0;
    animation: navItemSlideIn 0.4s ease-out both;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.2s; }
.nav-item:nth-child(3) { animation-delay: 0.3s; }
.nav-item:nth-child(4) { animation-delay: 0.4s; }
.nav-item:nth-child(5) { animation-delay: 0.5s; }
.nav-item:nth-child(6) { animation-delay: 0.6s; }

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

.nav-item a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item.active a,
.nav-item a:hover {
    background: #f8f9ff;
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-icon {
    margin-right: 12px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.nav-item.active .nav-icon,
.nav-item a:hover .nav-icon {
    opacity: 1;
}

.nav-text {
    font-weight: 500;
}

/* 主内容区域 */
.main-content {
    margin-left: 260px;
    padding: 30px;
    min-height: calc(100vh - 60px);
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-hidden {
    margin-left: 0;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section.active {
    opacity: 1;
    transform: translateY(0);
}

/* 页面标题区域 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e7;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

/* 按钮样式 */
.add-btn, .refresh-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.add-btn:hover, .refresh-btn:hover {
    background: var(--primary-pressed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 取消按钮样式 */
.cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
}

/* 提交按钮样式 */
.submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--primary);
    color: white;
}

.submit-btn:hover {
    background: var(--primary-pressed);
}

/* 添加播放按钮样式 */
.play-btn {
    background: #28a745;
    color: white;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: #218838;
    transform: scale(1.1);
}

/* 监控卡片 */
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.monitor-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: softFadeUp 360ms cubic-bezier(.2,.7,.2,1) both;
    will-change: transform, opacity;
    position: relative;
    overflow: hidden;
}

.monitor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.monitor-card:hover::before {
    transform: translateX(0);
}

.monitor-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.monitor-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1d1d1f;
}

.monitor-content {
    font-size: 14px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.status-item:hover {
    transform: translateX(2px);
}

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

.status-label {
    color: #666;
    font-weight: 500;
}

.status-value {
    color: var(--success);
    font-weight: 600;
}

.loading {
    text-align: center;
    color: #999;
    padding: 20px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.4; }
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--divider);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

.status-error {
    color: var(--danger);
    text-align: center;
    padding: 20px;
    background: #fff5f5;
    border-radius: 6px;
}

/* 状态标签样式 */
.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-inactive {
    color: #dc3545;
    font-weight: 600;
}

.status-online {
    color: #28a745;
    font-weight: 600;
}

.status-offline {
    color: #6c757d;
    font-weight: 600;
}

/* 视频播放器样式 */
.video-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.video-info {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.video-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.video-info p {
    margin: 4px 0;
    color: #666;
}

/* 视频添加/编辑模态框样式 */
#videoModal .modal-content {
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
}

#videoModal .modal-form {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    padding: 20px;
}

#videoModal .form-group {
    margin-bottom: 18px;
}

#videoModal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#videoModal .form-help {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    display: block;
}

#videoModal .form-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 16px 0 0 0;
    margin: 20px 0 0 0;
    border-top: 1px solid #e9ecef;
}

/* 视频播放模态框样式 */
#videoPlayerModal .modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
}

#videoPlayerModal .video-player-container {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

#videoPlayerModal .video-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 60vh;
    border-radius: 8px;
    background: #000;
}

#videoPlayerModal .video-info {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

#videoPlayerModal .video-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

#videoPlayerModal .video-info p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
}

/* 表格样式 */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    animation: softFadeUp 360ms cubic-bezier(.2,.7,.2,1) both;
    will-change: transform, opacity;
}

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

.data-table th {
    background: rgba(110, 142, 251, 0.08);
    color: #1d1d1f;
    font-weight: 600;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e5e7;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    transition: background-color 0.2s ease;
}

.data-table tbody tr {
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateX(-20px);
    animation: tableRowSlideIn 0.4s ease-out both;
}

.data-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.15s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.2s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.25s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.3s; }

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

.data-table tbody tr:hover {
    background: rgba(110, 142, 251, 0.06);
    transform: translateX(2px);
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.action-btn:hover::before {
    width: 40px;
    height: 40px;
}

.edit-btn {
    background: #4ecdc4;
    color: white;
}

.edit-btn:hover {
    background: #26d0ce;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
}

.delete-btn:hover {
    background: #ee5a52;
}

.play-btn {
    background: #28a745;
    color: white;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: #218838;
    transform: scale(1.1);
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 20px 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    margin: 0 auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    top: 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.close:hover {
    color: #333;
    background: rgba(0,0,0,0.05);
    transform: scale(1.1);
}

.modal-form {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: auto;
    background: #fff;
    flex-shrink: 0;
    border-radius: 0 0 8px 8px;
}

/* 视频模态框专用样式 */
#videoModal .modal-content {
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
}

#videoModal .modal-form {
    max-height: calc(90vh - 140px);
    overflow-y: auto;
    padding: 20px;
}

#videoModal .form-group {
    margin-bottom: 18px;
}

#videoModal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#videoModal .form-help {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    display: block;
}

#videoModal .form-actions {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 16px 0 0 0;
    margin: 20px 0 0 0;
    border-top: 1px solid #e9ecef;
}

/* 视频播放模态框专用样式 */
#videoPlayerModal .modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
}

#videoPlayerModal .video-player-container {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

#videoPlayerModal .video-player {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 60vh;
    border-radius: 8px;
    background: #000;
}

#videoPlayerModal .video-info {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

#videoPlayerModal .video-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

#videoPlayerModal .video-info p {
    margin: 4px 0;
    color: #666;
    font-size: 14px;
}

/* 表格样式 */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    animation: softFadeUp 360ms cubic-bezier(.2,.7,.2,1) both;
    will-change: transform, opacity;
}

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

.data-table th {
    background: rgba(110, 142, 251, 0.08);
    color: #1d1d1f;
    font-weight: 600;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e5e7;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    transition: background-color 0.2s ease;
}

.data-table tbody tr {
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateX(-20px);
    animation: tableRowSlideIn 0.4s ease-out both;
}

.data-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.15s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.2s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.25s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.3s; }

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

.data-table tbody tr:hover {
    background: rgba(110, 142, 251, 0.06);
    transform: translateX(2px);
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.action-btn:hover::before {
    width: 40px;
    height: 40px;
}

.edit-btn {
    background: #4ecdc4;
    color: white;
}

.edit-btn:hover {
    background: #26d0ce;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
}

.delete-btn:hover {
    background: #ee5a52;
}

.play-btn {
    background: #28a745;
    color: white;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: #218838;
    transform: scale(1.1);
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    padding: 20px 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    margin: 0 auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 40px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    top: 20px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.close:hover {
    color: #333;
    background: rgba(0,0,0,0.05);
    transform: scale(1.1);
}

.modal-form {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: auto;
    background: #fff;
    flex-shrink: 0;
    border-radius: 0 0 8px 8px;
}

/* 归档数据页面专用样式 */
#archive {
    padding: 0;
    background: transparent;
}

#archive .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 32px 32px 24px 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

#archive .section-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #4f46e5 50%, var(--success) 100%);
    border-radius: 20px 20px 0 0;
}

#archive .section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    background: linear-gradient(135deg, #1e293b 0%, var(--primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    letter-spacing: -0.02em;
}

/* 统计卡片网格优化 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
    padding: 0 4px;
}

.stats-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 28px;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border-color: rgba(110, 142, 251, 0.4);
}

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

.stats-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(110, 142, 251, 0.08), rgba(139, 92, 246, 0.08));
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.stats-card:hover .stats-icon {
    background: linear-gradient(135deg, rgba(110, 142, 251, 0.15), rgba(139, 92, 246, 0.15));
    transform: scale(1.1) rotate(5deg);
}

.stats-content {
    flex: 1;
}

.stats-content h3 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 8px 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stats-content p {
    color: #64748b;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    opacity: 0.8;
    letter-spacing: 0.01em;
}

/* 消息提示框 */
.message-box {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.message-box.show {
    opacity: 1;
    transform: translateX(0);
}

.message-box.success {
    background: var(--success);
}

.message-box.error {
    background: var(--danger);
}

.message-box.warning {
    background: var(--warning);
}

/* 加载状态优化 */
.loading {
    text-align: center;
    color: var(--muted);
    padding: 40px;
    font-size: 14px;
    position: relative;
    animation: pulse 1.5s infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式优化 */
@media (max-width: 1200px) {
    #archive .charts-container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 24px;
    }
    
    #archive .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    #archive {
        padding: 0 5px;
    }
    
    #archive .section-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    #archive .section-header h2 {
        font-size: 24px;
    }
    
    #archive .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 32px;
    }
    
    #archive .stats-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    #archive .stats-icon {
        font-size: 36px;
        padding: 12px;
    }
    
    #archive .stats-content h3 {
        font-size: 28px;
    }
    
    .charts-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-card {
        padding: 20px;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .filter-section {
        padding: 20px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-numbers {
        order: -1;
    }
}

@media (max-width: 480px) {
    #archive .section-header h2 {
        font-size: 22px;
    }
    
    #archive .stats-card {
        padding: 16px;
        border-radius: 16px;
    }
    
    #archive .stats-content h3 {
        font-size: 24px;
    }
    
    .chart-card {
        padding: 16px;
        border-radius: 12px;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .filter-section {
        padding: 16px;
        border-radius: 12px;
    }
    
    #archive .table-container {
        border-radius: 12px;
        overflow-x: auto;
    }
    
    #archive .data-table {
        min-width: 800px;
    }
    
    #archive .data-table th,
    #archive .data-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
}

/* 图表容器样式优化 */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border-color: rgba(110, 142, 251, 0.4);
}

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

.chart-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 24px 0;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #1e293b 0%, var(--primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
    background: rgba(248, 250, 252, 0.3);
    border-radius: 16px;
    padding: 16px;
    overflow: hidden;
}

.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 500;
}

.chart-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

/* 过滤器区域样式优化 */
.filter-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

.filter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 20px 20px 0 0;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.filter-group input,
.filter-group select {
    padding: 12px 16px;
    border: 1px solid rgba(209, 213, 219, 0.8);
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.filter-btn, .clear-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.filter-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.filter-btn:hover {
    background: var(--primary-pressed);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.clear-btn {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

.clear-btn:hover {
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
    transform: translateY(-1px);
}

/* 归档数据表格样式优化 */
#archive .table-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    overflow: hidden;
    position: relative;
}

#archive .table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 20px 20px 0 0;
}

#archive .data-table th {
    background: rgba(110, 142, 251, 0.06);
    color: #374151;
    font-weight: 700;
    padding: 20px 16px;
    text-align: left;
    border-bottom: 2px solid rgba(110, 142, 251, 0.1);
    font-size: 14px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    opacity: 0.9;
}

#archive .data-table td {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#archive .data-table tbody tr:hover {
    background: rgba(110, 142, 251, 0.04);
    transform: translateX(4px);
}

.no-data {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 40px;
    font-size: 16px;
}

/* 分页控件样式优化 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    margin-top: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
    gap: 24px;
    flex-wrap: wrap;
}

.pagination-info {
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid rgba(209, 213, 219, 0.8);
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(249, 250, 251, 0.8);
}

.page-numbers {
    display: flex;
    gap: 4px;
}

.page-number {
    padding: 8px 12px;
    border: 1px solid rgba(209, 213, 219, 0.8);
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
}

.page-number:hover {
    background: rgba(110, 142, 251, 0.1);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.page-number.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.page-size-select {
    padding: 8px 12px;
    border: 1px solid rgba(209, 213, 219, 0.8);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-size-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
