* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
}
.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.navbar {
    background: #2c3e50;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start; /* 左对齐 */
}
.navbar a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    background: #34495e;
    border-radius: 4px;
    font-size: 14px;
}
.navbar a:hover {
    background: #3d566e;
}
main {
    flex: 1;
    padding: 20px;
}
.footer {
    text-align: center;
    padding: 15px;
    background: #ecf0f1;
    font-size: 12px;
    color: #7f8c8d;
}
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}
.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    text-decoration: none;
}
.btn-success {
    background: #27ae60;
}
.btn-warning {
    background: #f39c12;
}
.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.balance-box {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.balance-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.balance-value {
    font-weight: bold;
    color: #2c3e50;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th {
    background: #f2f2f2;
}
.product-item {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.product-item .btn {
    width: auto;
    padding: 8px 20px;
}