/* 现代化 UI 样式 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: #333;
    font-size: 13px;
    min-height: 100vh;
}

.container { max-width: 1800px; margin: 0 auto; padding: 20px; }

/* 输入框美化 */
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.3s;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

input[type="text"]:hover,
input[type="number"]:hover,
select:hover {
    border-color: #cbd5e1;
}

/* 按钮美化 */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-default {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-default:hover {
    border-color: #667eea;
    color: #667eea;
}

.btn-danger {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-danger:disabled {
    background: #d1d5db;
    color: #f3f4f6;
    cursor: not-allowed;
    opacity: 1;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

/* 卡片样式 */
.control-panel,
.data-panel {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 表单组 */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    letter-spacing: 0.3px;
}

/* 筛选面板 */
.filters {
    background: #f9fafb;
    padding: 16px;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
}

.filter-inputs span {
    color: #9ca3af;
    font-weight: 600;
}

/* 进度条美化 */
.progress {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 标签页美化 */
.view-tab {
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
}

.view-tab:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
}

.view-tab.active {
    background: white;
    color: #667eea;
    border-bottom-color: white;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

/* 统计卡片 */
.stat-item {
    padding: 12px 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 搜索框美化 */
.search-box input {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    width: 280px;
    font-size: 13px;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 二次筛选面板 */
#secondaryFilter {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    border-radius: 12px;
    padding: 20px;
}

/* 复选框美化 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

/* 图片优化 */
.product-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #f3f4f6;
}

.product-img:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
    z-index: 10;
}

.no-img {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #9ca3af;
    border: 2px dashed #d1d5db;
}

/* 分页按钮 */
.pagination button {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    font-weight: 600;
}

.pagination button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* details 美化 */
details summary {
    padding: 12px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 16px;
    user-select: none;
    color: #374151;
    font-size: 14px;
    transition: all 0.3s;
}

details summary:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    transform: translateX(4px);
}

details[open] summary {
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    border-radius: 10px 10px 0 0;
}

/* 操作按钮区 */
#saveActions {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 2px solid #60a5fa;
    border-radius: 12px;
    padding: 16px;
}

/* 链接美化 */
.view-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    display: inline-block;
}

.view-link:hover {
    background: #eff6ff;
    transform: scale(1.05);
}

/* 类目标签 */
.category {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 11px;
    border: 1px solid #d1d5db;
}

/* 表格行 hover */
tr:hover {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

tr.highlight {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .container { padding: 12px; }
    .filters { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
}
