* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	padding: 20px;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	background: white;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	padding: 30px;
}

h1 {
	color: #333;
	margin-bottom: 30px;
	text-align: center;
	font-size: 28px;
}

.toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.info {
	padding: 10px;
	background: #f5f5f5;
	border-radius: 5px;
	font-size: 14px;
	color: #666;
}

.info strong {
	color: #667eea;
	font-size: 16px;
}

.loading {
	text-align: center;
	padding: 40px;
	color: #667eea;
	font-size: 16px;
}

.loading::after {
	content: '...';
	animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
	0%, 20% { content: '.'; }
	40% { content: '..'; }
	60%, 100% { content: '...'; }
}

.error {
	background: #fee;
	color: #c33;
	padding: 15px;
	border-radius: 5px;
	margin-bottom: 20px;
	border-left: 4px solid #c33;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
	background: white;
}

thead {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

th {
	padding: 15px;
	text-align: left;
	font-weight: 600;
	font-size: 14px;
}

th:first-child {
	width: 50px;
	text-align: center;
}

td {
	padding: 12px 15px;
	border-bottom: 1px solid #eee;
	font-size: 14px;
	color: #333;
}

td:first-child {
	text-align: center;
	width: 50px;
}

input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: #667eea;
}

tbody tr:hover {
	background: #f8f9ff;
	transition: background 0.2s;
}

tbody tr:last-child td {
	border-bottom: none;
}

.no-data {
	text-align: center;
	color: #999;
	padding: 40px !important;
}

/* 表格中的图片列 */
.cell-image {
	text-align: center;
	vertical-align: middle;
}

.cell-image .table-img {
	max-width: 80px;
	max-height: 80px;
	object-fit: contain;
	display: inline-block;
	vertical-align: middle;
	border-radius: 4px;
}

.cell-image .img-fail {
	display: none;
	font-size: 12px;
	color: #999;
}

.cell-image .img-fail.show {
	display: inline;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.container {
		padding: 15px;
	}
	
	h1 {
		font-size: 22px;
	}
	
	table {
		font-size: 12px;
	}
	
	th, td {
		padding: 8px;
	}
	
	/* 在小屏幕上，某些列可以隐藏或调整 */
	th:nth-child(3),
	td:nth-child(3) {
		display: none;
	}
}

/* 按钮样式（新增、删除等主按钮统一样式） */
.btn-add,
.btn-delete {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 5px;
	font-size: 14px;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	font-weight: 500;
}

.btn-add:hover,
.btn-delete:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-add:active,
.btn-delete:active {
	transform: translateY(0);
}

.btn-add:disabled,
.btn-delete:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* 弹窗样式 */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	justify-content: center;
	align-items: center;
	animation: fadeIn 0.3s;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.modal-content {
	background-color: white;
	border-radius: 10px;
	width: 90%;
	max-width: 500px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: slideDown 0.3s;
}

@keyframes slideDown {
	from {
		transform: translateY(-50px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 30px;
	border-bottom: 1px solid #eee;
}

.modal-header h2 {
	margin: 0;
	color: #333;
	font-size: 20px;
}

.close {
	color: #999;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	line-height: 1;
	transition: color 0.2s;
}

.close:hover {
	color: #333;
}

.modal-body {
	padding: 30px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 8px;
	color: #333;
	font-weight: 500;
	font-size: 14px;
}

.form-group input {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 5px;
	font-size: 14px;
	transition: border-color 0.2s;
}

.form-group input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 30px;
}

.btn-cancel,
.btn-submit {
	padding: 10px 20px;
	border: none;
	border-radius: 5px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.2s;
	font-weight: 500;
}

.btn-cancel {
	background: #f5f5f5;
	color: #666;
}

.btn-cancel:hover {
	background: #e0e0e0;
}

.btn-submit {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
}

.btn-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

/* 响应式设计 - 弹窗 */
@media (max-width: 768px) {
	.toolbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}
	
	.modal-content {
		width: 95%;
		margin: 20px;
	}
	
	.modal-header,
	.modal-body {
		padding: 20px;
	}
}

