/**
 * 二手家电管理系统 - 统一样式文件
 * 合并并优化所有CSS，解决样式冲突
 * 包含：全局变量、基础样式、组件、模块、响应式
 */

/* ==================== 全局变量 ==================== */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #818cf8;
    --secondary-color: #764ba2;
    --success-color: #5fb878;
    --warning-color: #ffb800;
    --danger-color: #ff5722;
    --danger-dark: #e64a19;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --bg-gray: #f5f7fa;
    --bg-white: #fff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --nav-width: 200px;
    --nav-collapsed-width: 60px;
}

/* ==================== 重置样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-gray);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ==================== 布局 ==================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/*纯色导航栏*/
.side-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--nav-width);
    height: 100vh;
    /*background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background: url('/static/images/bg.jpg') no-repeat center center;*/
    background: #23232b;
    no-repeat;
    transition: width 0.3s ease;
    z-index: 100;
    overflow: hidden;
    /*box-shadow: 2px 0 10px rgba(0,0,0,0.1);*/
}

/* 左侧导航栏 - PC端固定 - 背景图+模糊效果
.side-nav {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--nav-width);
    height: 100vh;
    background: #131216;
    transition: width 0.3s ease;
    z-index: 100;
    overflow: hidden;
    clip-path: inset(0);
}

.side-nav::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/bg.jpg') no-repeat center center;
    background-size: cover;
    filter: blur(6px);
    z-index: 0;
}

.side-nav > * {
    position: relative;
    z-index: 1;
}
结束*/

.side-nav.collapsed {
    width: var(--nav-collapsed-width);
}

.side-nav.collapsed .nav-brand span,
.side-nav.collapsed .nav-link span {
    display: none;
}

.side-nav.collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}

.side-nav.collapsed .nav-link i {
    margin: 0;
    font-size: 22px;
}

.side-nav.collapsed .nav-brand h3 {
    font-size: 0;
}

.side-nav.collapsed .nav-brand i {
    font-size: 24px;
}

/* 品牌区域 */
.nav-brand {
    padding: 20px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 20px;
}

.nav-brand h3 {
    color: white;
    margin: 0;
    font-size: 18px;
}

.nav-brand i {
    font-size: 24px;
}

.nav-brand span {
    display: inline-block;
    margin-left: 8px;
}

/* 导航菜单 */
.side-nav .nav-menu {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-nav .nav-item {
    width: 100%;
}

.side-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.side-nav .nav-link i {
    font-size: 20px;
    min-width: 24px;
    text-align: center;
}

.side-nav .nav-link span {
    font-size: 14px;
}

.side-nav .nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.side-nav .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
    border-left: 3px solid #ffd700;
}

/* ==================== 子菜单样式 ==================== */
.side-nav .nav-item.has-submenu {
    position: relative;
}

.side-nav .nav-link.has-submenu {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.side-nav .nav-link.has-submenu .submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 12px;
}

.side-nav .nav-link.has-submenu .submenu-arrow.rotated {
    transform: rotate(180deg);
}

.side-nav .submenu {
    list-style: none;
    padding-left: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.15);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.side-nav .submenu.show {
    max-height: 300px;
}

.side-nav .submenu .nav-item {
    width: 100%;
}

.side-nav .submenu .nav-link {
    padding: 10px 20px 10px 48px;
    font-size: 13px;
}

.side-nav .submenu .nav-link i {
    font-size: 16px;
    min-width: 24px;
}

.side-nav .submenu .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 折叠状态下的子菜单处理 */
.side-nav.collapsed .has-submenu .submenu {
    display: none;
}

.side-nav.collapsed .nav-link.has-submenu .submenu-arrow {
    display: none;
}

/* 收起/展开按钮 */
.nav-toggle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.nav-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.side-nav.collapsed .nav-toggle i {
    transform: rotate(180deg);
}

/* 右侧内容区 */
.main-content {
    flex: 1;
    margin-left: var(--nav-width);
    transition: margin-left 0.3s ease;
    padding: 15px;
    min-height: 100vh;
}

.side-nav.collapsed ~ .main-content {
    margin-left: var(--nav-collapsed-width);
}

/* ==================== 容器和卡片 ==================== */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 15px;
}

.card-header {
  position: relative;
  padding: 20px;
  color: var(--bg-white);
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: url('/static/images/bg4.jpg') no-repeat center center;
  background-size: cover;
  filter: blur(6px);
  z-index: 0;
  transform: scale(1.1);
}

.card-header > * {
  position: relative;
  z-index: 1;
}

.card-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.card-header h2 i {
    margin-right: 8px;
}

.card-header p {
    margin: 8px 0 0;
    opacity: 0.9;
    font-size: 13px;
}

.card-body {
    padding: 20px;
}

/* ==================== 表单 ==================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-label.required::before {
    content: '*';
    color: var(--danger-color);
    margin-right: 4px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input[disabled] {
    background: #f5f5f5;
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-color);
    color: var(--bg-white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--bg-white);
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--bg-white);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* ==================== 表格 ==================== */
.table-wrapper {
    overflow-x: auto;
    margin: 15px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f8f9fc;
    font-weight: 600;
    color: var(--text-secondary);
}

.data-table tr:hover {
    background: #fafafa;
}

/* 表格交替行背景色 */
.data-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;  /* 浅灰色，可根据需要调整 */
}
.data-table tbody tr:nth-child(odd) {
    background-color: #ffffff;  /* 白色 */
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-direction: row;  /* 添加这一行确保横向 */
}

/* ==================== 标签徽章 ==================== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: var(--success-color);
    color: var(--bg-white);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--bg-white);
}

.badge-danger {
    background: var(--danger-color);
    color: var(--bg-white);
}

.badge-info {
    background: var(--primary-color);
    color: var(--bg-white);
}

/* ==================== 详情页样式 ==================== */
.detail-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    width: 100px;
    flex-shrink: 0;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.5;
}

.detail-value {
    flex: 1;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.5;
}

/* 已售信息区块 */
.sold-section {
    background: #f8f9fc;
    border-radius: var(--radius-md);
    padding: 15px;
    margin: 15px 0;
    border-left: 4px solid var(--success-color);
}

.sold-title,
.sold-section-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--success-color);
}

.sold-section .detail-item {
    padding: 8px 0;
    border-bottom: 1px solid #e8e8e8;
}

.sold-section .detail-item:last-child {
    border-bottom: none;
}

/* 底部按钮组 */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-group .btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
}

/* ==================== 图片相关 ==================== */
.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 5px;
}

.image-card {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.image-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0,0,0,0.6);
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.image-delete:hover {
    background: var(--danger-color);
}

/* 上传按钮 */
.upload-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.image-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #f8f9fc;
    flex-shrink: 0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-btn {
    width: 100px;
    height: 100px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f8f9fc;
    transition: var(--transition);
}

.upload-btn:hover {
    border-color: var(--primary-color);
    background: #f0f2ff;
}

.upload-btn i {
    font-size: 28px;
    color: var(--text-muted);
}

.upload-btn span {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* 图片预览弹窗 */
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.preview-modal.show {
    display: flex;
}

.preview-img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.preview-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: var(--bg-white);
    cursor: pointer;
    z-index: 10001;
    transition: var(--transition);
}

.preview-close:hover {
    color: var(--danger-color);
}

.preview-prev,
.preview-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 80px;
    background: rgba(0,0,0,0.5);
    color: var(--bg-white);
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.preview-prev:hover,
.preview-next:hover {
    background: rgba(0,0,0,0.8);
}

.preview-prev {
    left: 20px;
}

.preview-next {
    right: 20px;
}

.preview-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--bg-white);
    padding: 6px 12px;
    background: rgba(0,0,0,0.6);
    border-radius: 20px;
    font-size: 14px;
    z-index: 10001;
}

/* ==================== 搜索相关 ==================== */
.search-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
}

.search-list {
    margin-top: 15px;
}

.list-item {
    background: #f8f9fc;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.list-info {
    flex: 1;
}

.list-code {
    font-family: monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.list-type {
    color: var(--text-secondary);
    font-size: 13px;
    margin-left: 10px;
}

.list-actions {
    display: flex;
    gap: 8px;
}

#reader {
    width: 100%;
    max-width: 400px;
    margin: 10px auto;
    border-radius: var(--radius-md);
    overflow: hidden;
}

/* ==================== 编码管理 ==================== */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.code-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== 统计页 ==================== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.total-row {
    background: #f6f6f6;
    font-weight: 600;
}

.total-row td {
    padding: 12px;
}

.profit-text {
    color: var(--success-color);
    font-size: 16px;
}

/* 筛选抽屉 */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    transition: all 0.3s ease;
}

.filter-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 380px;
    height: 100%;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.filter-drawer.open {
    left: 0;
}

.filter-drawer-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--bg-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-drawer-header h3 {
    margin: 0;
    font-size: 18px;
}

.filter-drawer-close {
    background: none;
    border: none;
    color: var(--bg-white);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.filter-drawer-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filter-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-drawer-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background: var(--bg-white);
}

.filter-drawer-footer .btn {
    flex: 1;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.filter-range {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-op {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
}

.filter-range-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-range-inputs .form-input {
    flex: 1;
}

/* 数据大屏 - 响应式网格 */
#dashboardGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-chart-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    min-width: 0; /* 防止溢出 */
}

.dashboard-chart-card [id^="chart_"] {
    width: 100%;
    min-height: 300px;
}


/* ==================== 工具类 ==================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 15px;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ==================== 顶部查询栏 ==================== */
.top-search-bar {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    padding: 15px 20px;
    position: relative;
}

.top-search-bar .search-area {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.top-search-bar .search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    transition: var(--transition);
}

.top-search-bar .search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 搜索结果下拉框 */
.search-result-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 8px;
    display: none;
}

.search-result-dropdown.show {
    display: block;
}

.search-result-dropdown .list-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.search-result-dropdown .list-item:hover {
    background: var(--bg-gray);
}

.search-result-dropdown .list-item:last-child {
    border-bottom: none;
}


/* 强制编码管理页操作按钮不换行 */
.code-table .action-buttons {
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 4px;
}

.code-table .action-buttons .btn-sm {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 4px 8px;
    font-size: 12px;
}

/* 让操作列自动获得足够宽度 */
.code-table td:last-child,
.code-table th:last-child {
    width: auto;
    min-width: 180px;
    white-space: normal;
}


/*sql页面的样式*/
.sql-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.sql-textarea {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    min-height: 300px;
    width: 100%;
    resize: vertical;
    border: 1px solid #e0e0e0;
    line-height: 1.5;
}
.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.result-table th,
.result-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    text-align: left;
    word-break: break-all;
}
.result-table th {
    background: #f5f5f5;
    font-weight: 600;
}
.result-table tr:hover {
    background: #fafafa;
}
.result-wrapper {
    overflow-x: auto;
    margin-top: 15px;
}
.info-bar {
    margin-top: 10px;
    padding: 8px 12px;
    background: #e8f4e8;
    border-radius: 4px;
    color: #2d6a2d;
}
.error-bar {
    background: #ffe8e8;
    color: #c62828;
}
.result-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.result-tab {
    padding: 6px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.result-tab:hover {
    background: #e0e0e0;
}
.result-tab.active {
    background: var(--primary-color);
    color: white;
}
.result-tab.error-tab {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
.result-tab.error-tab.active {
    background: #c62828;
    color: white;
}
.result-pane {
    display: none;
}
.result-pane.active {
    display: block;
}
.execution-stats {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.selected-text-tip {
    background: #e3f2fd;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #1565c0;
}
.warning-tip {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 13px;
}
.toolbar-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
}


/* 商品编辑页和服务编辑页表单水平布局 */
#goodsForm .form-group,
#serviceForm .form-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}
#goodsForm .form-label,
#serviceForm .form-label {
    width: 100px;          /* 固定标签宽度，可根据需要调整 */
    flex-shrink: 0;
    margin-bottom: 0;
    padding-top: 8px;      /* 与输入框垂直对齐 */
    text-align: left;     /* 标签右对齐，更美观 */
    padding-right: 12px;
}
#goodsForm .form-input,
#goodsForm .form-select,
#goodsForm .form-textarea,
#serviceForm .form-input,
#serviceForm .form-select,
#serviceForm .form-textarea {
    flex: 1;
    min-width: 0;          /* 防止溢出 */
}
/* 图片上传区域保持原样（不水平排列） */
#goodsForm .upload-area,
#serviceForm .upload-area {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
}
/* 已售信息区块内的表单组也水平排列 */
.sold-section .form-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}
.sold-section .form-label {
    width: 100px;
    flex-shrink: 0;
    margin-bottom: 0;
    text-align: left;
    padding-right: 12px;
}
.sold-section .form-input {
    flex: 1;
}