<style>
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    margin: 20px;
    padding: 30px;
    max-width: none;
    width: calc(100% - 40px);
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.header h1 {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 10px;
}

.batch-controls {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.table th {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px;
    font-weight: 600;
}

.table td {
    padding: 12px;
    vertical-align: middle;
    border-color: #e9ecef;
}

.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.invalid-input {
    background-color: #ffe6e6 !important;
    border-color: #dc3545 !important;
}

.alert {
    border-radius: 10px;
    border: none;
    margin-top: 20px;
}

.alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.checkbox-cell {
    text-align: center;
    width: 50px;
}

.checkbox-cell input[type="checkbox"] {
    transform: scale(1.2);
}

.action-cell {
    text-align: center;
    width: 130px;
}

.copies-cell {
    width: 80px;
}

.price-cell {
    width: 120px;
}

.barcode-cell {
    width: 180px;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

@media (max-width: 768px) {
    .container {
	margin: 10px;
	padding: 15px;
    }
    
    .table-responsive {
	font-size: 14px;
    }
}

/* 预览相关样式 */
.preview-tooltip {
    position: fixed;
    z-index: 1050;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 15px;
    min-width: 300px;
    max-width: 330px;
    display: none;
    pointer-events: none;
}

.label-preview {
    width: 300px;
    height: 225px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: white;
    position: relative;
    font-family: Arial, sans-serif;
}

.label-preview .product-name {
    position: absolute;
    top: 20px;
    left: 15px;
    right: 15px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.label-preview .barcode-container {
    position: absolute;
    top: 50px;
    left: 15px;
    right: 15px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.label-preview .barcode-svg {
    max-width: 100%;
    max-height: 100%;
}

.label-preview .price {
    position: absolute;
    top: 140px;
    left: 15px;
    right: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #e74c3c;
    text-align: center;
}

.label-preview .remark {
    position: absolute;
    top: 170px;
    left: 15px;
    right: 15px;
    font-size: 12px;
    color: #666;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.label-preview .copies-info {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 10px;
    color: #999;
}

.btn-preview {
    background: linear-gradient(45deg, #17a2b8, #138496);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.btn-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.4);
    color: white;
}
</style>
