body {
    font-family: "Microsoft YaHei", "Noto Sans SC", sans-serif;
    background-color: #f8f9fa;
    padding-bottom: 60px;
}

.card {
    border-radius: 10px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#home-screen .card {
    cursor: pointer;
}

.process-btn, .process-btn-continuous {
    min-width: 100px;
    margin: 5px;
    padding: 10px 15px;
    border-radius: 20px;
    font-weight: 500;
}

.scanner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scanner-container {
    width: 100%;
    max-width: 500px;
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.toast-container {
    position: fixed;
    bottom: 120px;
    right: 20px;
    z-index: 1060;
}

.custom-toast {
    opacity: 1;
    transition: opacity 0.3s ease;
    margin-bottom: 10px;
    min-width: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pending-item .badge {
    font-size: 0.8rem;
}

/* 产品详情样式 */
.product-detail-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.product-detail-item:last-child {
    border-bottom: none;
}

.product-detail-label {
    font-weight: bold;
    color: #555;
}

/* 查询结果项样式 */
.process-item, .model-item, .product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.process-item:hover, .model-item:hover, .product-item:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.process-item .badge, .model-item .badge {
    font-size: 0.9rem;
    padding: 5px 10px;
}

/* 固定底部按钮 */
.fixed-bottom {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding-bottom: env(safe-area-inset-bottom); /* 适配iPhone X及以上机型 */
    z-index: 1030; /* 确保z-index比toast低 */
}

#fixed-delete-buttons {
    z-index: 1030; /* 确保按钮在其他元素之上，但低于toast */
}

/* 全局表格边框样式 */
table {
    border-collapse: collapse !important;
    border: 1px solid #dee2e6 !important;
}
table th, table td {
    border: 1px solid #dee2e6 !important;
}

/* 删除记录页面悬浮按钮加强样式 */
#fixed-delete-buttons {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
}

/* 删除记录页面样式 */
#delete-records-content .table {
    margin-bottom: 80px; /* 增大空间，确保底部固定按钮不遮挡表格内容 */
}

#delete-records-content .record-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-delete {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 手动输入框样式 */
#manual-product-code {
    border-radius: 5px 0 0 5px;
    border-right: none;
}

#submit-manual-code {
    border-radius: 0 5px 5px 0;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .process-btn, .process-btn-continuous {
        min-width: auto;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
} 

/* 添加模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
}

.modal.show {
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
    max-width: 500px;
    margin: 1.75rem auto;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.3rem - 1px);
    border-top-right-radius: calc(0.3rem - 1px);
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    border-top: 1px solid #dee2e6;
    border-bottom-right-radius: calc(0.3rem - 1px);
    border-bottom-left-radius: calc(0.3rem - 1px);
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    opacity: 0.5;
}

/* 隐藏除主页外其他页面下的模态框 */
.d-none .modal {
    display: none !important;
} 