* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #E63946;
    --primary-red-light: #F77F88;
    --primary-red-dark: #C5303A;
    --secondary-red: #FF6B6B;
    --accent-pink: #FFE5E8;
    --bg-gradient-start: #FFF5F6;
    --bg-gradient-end: #FFFFFF;
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;
    --card-bg: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(230, 57, 70, 0.08);
    --shadow-md: 0 4px 16px rgba(230, 57, 70, 0.12);
    --shadow-lg: 0 8px 32px rgba(230, 57, 70, 0.16);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    padding: 32px 0;
    box-shadow: var(--shadow-lg);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.logo {
    padding: 0 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.logo h1 {
    color: white;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
}

.logo p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-top: 8px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin: 4px 16px;
    cursor: pointer;
    padding: 14px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-weight: 500;
}

.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
}

.header {
    margin-bottom: 40px;
}

.header h2 {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--secondary-red) 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 8px;
}

.stat-change {
    font-size: 13px;
    color: var(--text-light);
}

.stat-change.positive {
    color: var(--primary-red);
}

.content-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent-pink);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn {
    padding: 10px 24px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--accent-pink);
    color: var(--primary-red);
}

.btn-secondary:hover {
    background: var(--primary-red-light);
    color: white;
}

.btn-small {
    padding: 6px 16px;
    font-size: 13px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--accent-pink);
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-red);
    font-size: 14px;
}

td {
    padding: 16px;
    border-bottom: 1px solid #F0F0F0;
    color: var(--text-secondary);
    font-size: 14px;
}

tr:hover {
    background: var(--bg-gradient-start);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #D4EDDA;
    color: #155724;
}

.badge-warning {
    background: #FFF3CD;
    color: #856404;
}

.badge-danger {
    background: #F8D7DA;
    color: #721C24;
}

.badge-info {
    background: var(--accent-pink);
    color: var(--primary-red);
}

.chart-container {
    height: 300px;
    margin-top: 24px;
    position: relative;
}

canvas {
    max-width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E8E8E8;
    border-radius: 10px;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px var(--accent-pink);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.list-item {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    background: var(--bg-gradient-start);
    transition: var(--transition);
    cursor: pointer;
}

.list-item:hover {
    background: var(--accent-pink);
    transform: translateX(4px);
}

.list-item-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.list-item-meta {
    font-size: 13px;
    color: var(--text-light);
}

.progress-bar {
    height: 8px;
    background: #F0F0F0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red) 0%, var(--secondary-red) 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

.hidden {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    .main-content {
        margin-left: 240px;
        padding: 24px;
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 2px solid var(--accent-pink);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent-pink);
    color: var(--primary-red);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #F0F0F0;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-red-light);
    border-radius: 3px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #F0F0F0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 消息提示 */
.toast {
    position: fixed;
    top: 80px;
    right: 24px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    min-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.toast-success .toast-icon {
    background: #D4EDDA;
    color: #155724;
}

.toast-error .toast-icon {
    background: #F8D7DA;
    color: #721C24;
}

.toast-info .toast-icon {
    background: var(--accent-pink);
    color: var(--primary-red);
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--accent-pink);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

/* 时间轴 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #E8E8E8;
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #E8E8E8;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #E8E8E8;
}

.timeline-item.completed .timeline-dot {
    background: var(--primary-red);
    box-shadow: 0 0 0 2px var(--primary-red);
}

.timeline-item.active .timeline-dot {
    background: var(--secondary-red);
    box-shadow: 0 0 0 2px var(--secondary-red);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timeline-content {
    padding-left: 8px;
}

.timeline-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-time {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.timeline-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.timeline-item.completed .timeline-title {
    color: var(--primary-red);
}

/* 文件列表 */
.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-gradient-start);
    border-radius: 8px;
    margin-bottom: 8px;
}

/* 复选框样式 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-red);
}

input[type="radio"] {
    cursor: pointer;
    accent-color: var(--primary-red);
}
