body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #fdf6e3;
    color: #333;
    display: flex;
    justify-content: center;
    padding: 20px;
    margin: 0;
}
.container { width: 100%; max-width: 400px; }
.app-title { color: #d35400; font-size: 24px; margin-bottom: 15px; text-align: center; }

/* 卡片通用样式 */
.card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}
.hidden { display: none !important; }

/* 卡片顶部布局 */
.card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.subtitle { color: #7f8c8d; font-size: 14px; margin: 0; }

/* 右上角历史按钮 */
.btn-icon {
    background-color: #f1f2f6; color: #e67e22; border: none;
    padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; cursor: pointer;
}
.btn-icon:hover { background-color: #e67e22; color: white; }

/* 表单控件 */
.form-group { margin-bottom: 15px; text-align: left; }
label { display: block; font-weight: bold; margin-bottom: 5px; color: #555; font-size: 14px; }
select, input {
    width: 100%; padding: 10px; border: 2px solid #eee;
    border-radius: 10px; font-size: 16px; outline: none; background: #fafafa; box-sizing: border-box;
}
select:focus, input:focus { border-color: #ff9f43; }
.badge { display: inline-block; background: #ff9f43; color: white; padding: 3px 8px; border-radius: 4px; font-size: 12px; margin-top: 5px; }

/* 底部大按钮 */
.btn-primary { width: 100%; padding: 12px; background: #e67e22; color: white; border: none; border-radius: 12px; font-size: 18px; font-weight: bold; cursor: pointer; }
.btn-secondary { width: 100%; padding: 12px; background: #95a5a6; color: white; border: none; border-radius: 12px; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 5px; }

/* 小票样式 */
.ticket { border: 2px dashed #ddd; padding: 15px; border-radius: 10px; background: #fffdf0; margin-bottom: 15px; }
.ticket-row { display: flex; justify-content: space-between; margin: 8px 0; font-size: 15px; }
.highlight { color: #d35400; font-weight: bold; }
.footer-text { font-size: 12px; color: #999; margin-top: 10px; text-align: center; }

/* === 弹窗与历史记录列表 === */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 999;
    display: flex; justify-content: center; align-items: flex-end;
}
.modal-content {
    background: white; width: 100%; max-width: 500px; height: 85%;
    border-radius: 20px 20px 0 0; padding: 20px; box-sizing: border-box;
    display: flex; flex-direction: column; animation: slideUp 0.3s;
}
@keyframes slideUp { from {transform: translateY(100%)} to {transform: translateY(0)} }

.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.close-btn { font-size: 28px; cursor: pointer; color: #999; }
.history-list { flex: 1; overflow-y: auto; padding-top: 10px; }

.history-item {
    background: #f9f9f9; border-left: 4px solid #e67e22;
    padding: 12px; margin-bottom: 10px; border-radius: 6px; 
    display: flex; justify-content: space-between; align-items: center;
}
.history-info { flex: 1; }
.history-date { font-weight: bold; display: block; margin-bottom: 4px; color: #333; }
.history-detail { font-size: 13px; color: #666; }
.delete-btn {
    background-color: #ff7675; color: white; border: none;
    padding: 8px 12px; border-radius: 8px; font-size: 12px;
    cursor: pointer; margin-left: 10px; white-space: nowrap;
}
.delete-btn:active { background-color: #d63031; }