* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 30px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
}

nav {
    background-color: #3498db;
    padding: 10px;
    border-radius: 4px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    margin-right: 5px;
    border-radius: 3px;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
}

nav a.active, nav a:hover {
    background-color: #2980b9;
}

.section {
    background-color: white;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #555;
}

tr:hover {
    background-color: #f9f9f9;
}

.btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    background-color: #27ae60;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
    background-color: #3498db;
    color: white;
    border-radius: 3px;
    margin-right: 5px;
    -webkit-tap-highlight-color: transparent;
}

.btn-sm:hover {
    background-color: #2980b9;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.form-group label {
    width: 100%;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input, 
.form-group select {
    flex: 1;
    min-width: 150px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input, select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
    input, select {
        -webkit-appearance: none;
        border-radius: 4px;
    }
    
    select {
        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='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 8px center;
        padding-right: 30px;
    }
    
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"] {
        padding: 9px 10px;
    }
}

input:focus, select:focus {
    border-color: #3498db;
    outline: none;
}

.form-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    z-index: 100;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

#addDataForm.form-popup {
    max-width: 700px;
}

.form-container {
    width: 100%;
}

.cancel {
    background-color: #e74c3c;
}

.cancel:hover {
    background-color: #c0392b;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
}

.dashboard {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 16px;
}

.stat-card p {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
}

/* 响应式表单布局 */
@media (max-width: 480px) {
    .form-group {
        flex-direction: column;
    }
    
    .form-popup {
        width: 95%;
        padding: 15px;
    }
}