/* PWA 相关样式 */
.install-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    font-size: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.install-button:hover {
    background: #218838;
    transform: scale(1.1);
}

.install-button:active {
    transform: scale(0.95);
}

/* 日历记录弹窗样式 */
.day-records-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1050;
    min-width: 280px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: hidden;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.popup-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    padding: 16px 20px;
    max-height: 300px;
    overflow-y: auto;
}

.record-summary {
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.record-summary:last-child {
    border-bottom: none;
}

.record-product {
    font-weight: 600;
    color: #28a745;
    margin-bottom: 4px;
}

.record-amount {
    font-size: 18px;
    font-weight: 600;
    color: #dc3545;
    margin-bottom: 4px;
}

.record-details {
    font-size: 14px;
    color: #6c757d;
}

.popup-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #28a745;
    font-weight: 600;
    font-size: 16px;
    color: #28a745;
    text-align: right;
}

.popup-actions {
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.popup-actions .btn {
    min-width: 80px;
}

/* 移动端优化 */
@media (max-width: 576px) {
    .day-records-popup {
        min-width: 320px;
        max-width: 95vw;
    }
    
    .popup-actions {
        flex-direction: column;
    }
    
    .popup-actions .btn {
        width: 100%;
    }
    
    .install-button {
        bottom: 90px;
        right: 16px;
    }
}