* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* 登录页样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-box input {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.login-box button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.demo-info {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* 主布局 */
.app-header {
    background: white;
    padding: 12px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.logo span {
    color: #667eea;
}

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.logout-btn {
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* 侧边栏 */
.sidebar {
    width: 250px;
    background: white;
    border-radius: 12px;
    margin: 20px;
    padding: 15px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar a:hover, .sidebar a.active {
    background: #667eea;
    color: white;
}

/* 主内容区 */
.main-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.content {
    flex: 1;
    padding: 20px;
    margin: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    overflow-x: auto;
}

/* 卡片样式 */
.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-danger {
    background: #ef4444;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* 表单 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 60px;
        width: 260px;
        height: calc(100% - 60px);
        z-index: 99;
        transition: left 0.3s;
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .content {
        margin: 10px;
        padding: 15px;
    }
    
    table, thead, tbody, th, td, tr {
        display: block;
    }
    
    thead {
        display: none;
    }
    
    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }
    
    td {
        display: flex;
        justify-content: space-between;
        padding: 8px;
        border: none;
    }
    
    td:before {
        content: attr(data-label);
        font-weight: bold;
        width: 40%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}