.button-group {
    display: flex;
    gap: 15px;
    width: 100%;
}
.button-group button {
    flex: 1;
    padding: 10px;
    border: 1px solid #999;
    background-color: #ddd;
    border-radius: 4px;
    cursor: pointer;
}
.button-group button.active {
    background-color: #27ae60;
    color: white;
}

.price-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
}
.item-img {
    width: 100px;
    height: auto;
    margin-right: 20px;
}
input[type="number"] {
    padding: 8px;
    width: 150px;
}

.income-img {
    max-width: 400px;
    margin-top: 10px;
}


.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.price-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;

    /* 新增：固定高度 + 垂直布局 */
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: start;
}

.price-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
    max-height: 120px;
}

/* 输入框固定到底部 */
.price-card input {
    margin-top: auto;
    width: 100%;
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}



.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.history-card {
    background: #f7f7f7;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100px;
}

.history-content {
    margin-bottom: 8px;
    font-size: 14px;
}

.history-card button {
    align-self: flex-end;
    padding: 4px 8px;
    font-size: 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.history-card button:hover {
    background-color: #c0392b;
}


.income-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

.form-title {
    flex: 1;
    font-weight: bold;
    font-size: 16px;
    padding: 10px 0;
    text-align: left;
    background-color: #f0f0f0;
    padding-left: 10px;
}

.form-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
}

.file-input {
    flex: 1;
    max-width: 40%;
    padding: 8px;
}

.submit-btn {
    flex: 1;
    max-width: 40%;
    padding: 8px 12px;
    background-color: #3498db;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

.submit-btn:hover {
    background-color: #2980b9;
}

.income-result {
    padding: 10px;
    background-color: #fafafa;
}

.income-img {
    width: 30%;
    max-width: 30%;
    margin-top: 10px;
    border: 1px solid #ccc;
}

.income-items {
    margin-top: 10px;
}

.item-line {
    margin: 4px 0;
    font-family: monospace;
}


.fixed-submit-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 28px;
    background-color: #27ae60;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.fixed-submit-btn:hover {
    background-color: #219150;
}


.income-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.form-title {
    font-size: 18px;
    font-weight: bold;
}

.form-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-input {
    font-size: 16px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
}

.submit-btn {
    padding: 8px 20px;
    font-size: 16px;
    background-color: #1aad19;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.income-result {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
}

.income-img {
    width: 40%;
    max-width: 40%;
    margin-top: 10px;
    border: 1px solid #ccc;
    object-fit: contain;
}

.income-display {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
    flex-wrap: wrap;  /* 移动端自动换行 */
}

.income-items {
    flex: 1;
    min-width: 240px;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    max-width: 48%;
    margin-top: 10px;
}

.item-line {
    margin-bottom: 6px;
}


/**/
.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    /*margin-bottom: 70px; !* 给底部按钮留空 *!*/
}


.item-img {
    width: 100%;
    max-height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
    border: 1px solid #ddd;
}

.fixed-submit-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 5px 0;
}

.pagination button {
    padding: 5px 20px;
    font-size: 16px;
    border-radius: 8px;
    background-color: #409EFF;
    color: white;
    border: none;
    cursor: pointer;
}

#pageInfo {
    font-size: 18px;
    font-weight: bold;
}
