* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 8px;
}

header p {
    color: #666;
    font-size: 1rem;
}

/* 统计卡片 */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
}

/* 搜索栏 */
.search-bar {
    margin-bottom: 25px;
    display: flex;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: #667eea;
}

/* 表单面板 */
.form-panel {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.form-panel h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

button {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #555;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-edit {
    background: #4caf50;
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #45a049;
}

.btn-delete {
    background: #f44336;
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-delete:hover {
    background: #da190b;
}

/* 表格 */
.records-panel h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

tr:hover {
    background: #f8f9fa;
}

.empty-row td {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .stats-panel {
        grid-template-columns: 1fr;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}