/* ============ 物价过滤页面 ============ */
.price-filter-container {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    padding-top: 0.1rem;
    max-width: 1600px;
    width: calc(100% - 2rem);
    margin: 1rem auto;
    overflow: visible; /* 允许页面滚动 */
}

#affix-page {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
}

.price-filter-left,
.price-filter-right {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    overflow: hidden;
}

.price-filter-left {
    width: 190px;
    min-width: 180px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.price-filter-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.price-filter-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    gap: 2rem;
    background: transparent;
    border: none;
    padding: 0;
    padding-top: 90px; /* 为 fixed 顶部栏留空间 */
    min-width: 0; /* 允许内部滚动区域收缩 */
}

.price-group-panel,
.price-items-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.price-group-panel--controls {
    padding: 0.5rem 0.75rem;
}

[data-theme="dark"] .price-group-panel,
[data-theme="dark"] .price-items-panel {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.price-group-panel {
    overflow-x: auto;
    overflow-y: visible;
    flex-shrink: 0;
    max-width: 100%;
    position: relative;
    z-index: 10;
    background: var(--bg-secondary);
}

/* ============ 顶部控制栏（简化结构） ============ */
.price-controls-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 1rem;
    min-height: 52px;
    position: fixed;
    top: 130px; /* 导航栏高度 + 一点间距 */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 4rem);
    max-width: 1536px; /* 1600 - 64 padding */
    z-index: 100;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.price-controls-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: start;
}

.price-controls-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-self: end;
}

.price-controls-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.price-group-panel--modules {
    max-height: 50vh;
    overflow-y: auto;
}

.price-group-panel--modules .price-group-modules {
    margin-top: 0;
}

.price-items-panel {
    height: 80vh;
    min-height: 80vh;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0; /* 防止子元素撑开面板 */
}

.price-group-panel-header,
.price-items-panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

/* 物价物品搜索框 */
.price-items-panel-header .items-search-container {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border-bottom: none;
}

.price-group-panel-header {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    overflow: visible;
}

.price-group-panel--controls .price-group-panel-header {
    background: transparent;
}

.price-group-panel-header > .price-csv-info-row,
.price-group-panel-header > .price-group-modules-header {
    background: transparent;
    border: none;
    padding: 0;
}

.price-group-panel-header > .price-group-modules-header {
    position: relative;
    padding-top: 1rem;
    margin-top: 0.6rem;
}

.price-group-panel-header > .price-group-modules-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
}

[data-theme="dark"] .price-group-panel-header > .price-group-modules-header::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

/* CSV 文件信息行 */
.price-csv-info-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    padding: 0.3rem 0.5rem;
    background: transparent;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: visible;
    z-index: 2;
    min-height: 44px;
}

.price-csv-info-left,
.price-csv-info-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    z-index: 2;
}

.price-csv-info-left {
    justify-self: start;
}

.price-csv-info-right {
    justify-self: end;
}

.price-csv-info-center {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    gap: 0.6rem;
}

.price-csv-date-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-left: 0.2rem;
}

.price-group-modules-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.1rem;
    padding: 0.35rem 0.6rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    justify-content: space-between;
}

.price-group-modules-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 240px;
}

.price-group-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.price-group-filter-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #B744FF;
    cursor: pointer;
}

.price-group-filter-toggle:hover {
    color: var(--text-primary);
}


.price-group-modules-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.price-group-modules-actions {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.price-group-modules {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-top: 1.6rem;
}

.price-group-panel--modules .price-group-modules {
    gap: 0.8rem;
}

.price-group-module {
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--bg-secondary) 85%, #ffffff),
        var(--bg-secondary));
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--border-light) 85%, transparent);
    padding: 0.7rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    position: relative;
}

.price-group-module-topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.price-group-module-actions {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-left: auto;
}

.price-group-module-action {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid rgba(52, 199, 89, 0.45);
    background: rgba(52, 199, 89, 0.18);
    color: #2f9e44;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.price-group-module-action:hover {
    background: rgba(52, 199, 89, 0.28);
    color: #1f7a35;
    border-color: rgba(52, 199, 89, 0.65);
}

.price-group-module-action--remove:hover {
    border-color: rgba(255, 59, 48, 0.7);
    color: #c62828;
    background: rgba(255, 59, 48, 0.22);
}

.price-group-module-action--remove {
    border-color: rgba(255, 59, 48, 0.55);
    background: rgba(255, 59, 48, 0.16);
    color: #d64545;
}

.price-group-module-header-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    justify-content: center;
    position: relative;
}

.price-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    flex: 1;
    justify-content: center;
}

.price-category-tab {
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: transform 0.12s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.price-category-tab:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(30, 136, 255, 0.18);
}

.price-category-tab.is-active {
    background: rgba(30, 136, 255, 0.18);
    border-color: rgba(30, 136, 255, 0.65);
    color: #1e88ff;
    font-weight: 600;
}

.price-category-tab.is-selected {
    color: #1e88ff;
}

.price-category-tab.is-complete:not(.is-active) {
    border-color: rgba(183, 68, 255, 0.75);
    color: #B744FF;
}

/* 物品列表模块：紫色 */
.price-panel-category-tabs .price-category-tab.is-complete:not(.is-active) {
    border-color: rgba(183, 68, 255, 0.75);
    color: #B744FF;
}

/* 价格分组模块：蓝色 */
.price-group-module .price-category-tab.is-complete:not(.is-active),
.price-group-module .price-category-tab.is-selected.is-complete:not(.is-active) {
    border-color: rgba(30, 136, 255, 0.7);
    color: #1e88ff;
}

.price-category-tab:active {
    transform: translateY(0);
    box-shadow: none;
}

.price-group-module:not(.is-active) .price-category-tab {
    opacity: 0.7;
    color: var(--text-tertiary);
    border-color: var(--border-light);
}

.price-group-module:not(.is-active) .price-category-tab.is-complete:not(.is-active) {
    opacity: 1;
    color: #1e88ff;
    border-color: rgba(30, 136, 255, 0.7);
}

.price-group-module.is-active {
    border-color: #1e88ff;
    border-width: 1.2px;
    box-shadow: 0 6px 14px rgba(30, 136, 255, 0.22);
    transform: translateY(-1px);
}

.price-group-module:hover {
    border-color: rgba(30, 136, 255, 0.6);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.price-group-module.is-active:hover {
    /* 选中状态下不再有额外的hover效果 */
    border-color: #1e88ff;
    box-shadow: 0 6px 14px rgba(30, 136, 255, 0.22);
    transform: translateY(-1px);
}

.price-group-drag-handle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-tertiary);
    cursor: grab;
    user-select: none;
    padding: 0;
    line-height: 1;
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.2s ease;
    position: absolute;
    left: -6px;
    top: -6px;
    z-index: 2;
}

.price-group-drag-handle:hover {
    opacity: 1;
    transform: translate(-1px, -1px);
}

.price-group-module.is-active .price-group-drag-handle {
    color: #1e88ff;
}

.price-group-module.is-dragging {
    opacity: 0.65;
}

.price-group-module.is-drag-over {
    outline: 2px dashed rgba(30, 136, 255, 0.55);
    outline-offset: 4px;
}

.price-group-module.is-insert-after::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -6px;
    height: 3px;
    border-radius: 4px;
    background: rgba(30, 136, 255, 0.7);
    box-shadow: 0 2px 6px rgba(30, 136, 255, 0.35);
}

[data-theme="dark"] .price-group-module.is-insert-after::after {
    background: rgba(96, 165, 250, 0.75);
    box-shadow: 0 2px 6px rgba(96, 165, 250, 0.4);
}

.price-group-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.price-subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    justify-content: center;
}

.price-subcategory-item {
    position: relative;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.price-group-module .price-group-item input,
.price-group-module .price-group-item select {
    cursor: text;
}

.price-subcategory-item:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.price-subcategory-item.is-selected {
    background: rgba(30, 136, 255, 0.18);
    border-color: rgba(30, 136, 255, 0.65);
    color: #1e88ff;
    font-weight: 600;
}

.price-subcategory-item.is-locked {
    cursor: not-allowed;
    opacity: 0.45;
    border-style: dashed;
}

.price-csv-date-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.price-csv-date-value {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* ============ 统一的操作按钮样式 ============ */

/* 下拉菜单容器 */
.price-action-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 3;
}

/* 统一按钮基础样式 */
.price-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    white-space: nowrap;
    box-shadow: none;
}

/* 蓝色按钮 */
.price-action-btn--blue {
    background: rgba(10, 132, 255, 0.12);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
}

.price-action-btn--blue:hover {
    background: rgba(10, 132, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: none;
}

.price-action-btn--blue.loaded {
    background: rgba(10, 132, 255, 0.18);
}

/* 紫色按钮 */
.price-action-btn--purple {
    background: rgba(183, 68, 255, 0.12);
    border: 1px solid #B744FF;
    color: #B744FF;
}

.price-action-btn--purple:hover {
    background: rgba(183, 68, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: none;
}

.price-action-btn--wide {
    padding: 0.5rem 2rem;
}

/* 下拉菜单 */
.price-action-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 120px;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 0.35rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 2px;
}

.price-action-dropdown:hover .price-action-menu {
    display: flex;
}

/* 点击按钮后短暂固定展开（避免鼠标移动触发消失） */
.price-action-dropdown.is-pinned .price-action-menu {
    display: flex;
}

/* JS 锁定展开状态 */
.price-action-dropdown.is-open .price-action-menu {
    display: flex;
}

/* 下拉选项 */
.price-action-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.6rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: center;
    width: 100%;
}

.price-action-option:hover {
    background: var(--bg-tertiary);
}

.price-action-option--checkbox {
    gap: 0.45rem;
    cursor: pointer;
    user-select: none;
    width: 100%;
    justify-content: center;
}

.price-action-option--checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #B744FF;
    cursor: pointer;
}

.price-action-option--checkbox:hover {
    background: var(--bg-tertiary);
}

.price-action-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.price-group-panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}


.price-toggle-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-size-toggle {
    display: inline-flex;
    background: var(--bg-tertiary);
    border-radius: 999px;
    padding: 0.2rem;
    border: 1px solid var(--border-light);
}

.price-size-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.price-size-btn:hover {
    color: var(--text-primary);
    background: var(--bg-primary);
}

.price-size-btn.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 600;
}

/* 物品面板分类标签容器（复用分组模块的标签样式） */
.price-panel-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
}

.price-panel-subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-top: 0.35rem;
    justify-content: center;
}

/* 物品面板分类标签 - 紫色系样式覆盖 */
.price-panel-category-tabs .price-category-tab.is-active {
    background: rgba(183, 68, 255, 0.18);
    border-color: rgba(183, 68, 255, 0.65);
    color: #B744FF;
}

.price-panel-category-tabs .price-category-tab.is-selected {
    color: #B744FF;
}

.price-panel-category-tabs .price-category-tab:hover {
    box-shadow: 0 4px 10px rgba(183, 68, 255, 0.18);
}

.price-panel-subcategory-list .price-subcategory-item.is-selected {
    background: rgba(183, 68, 255, 0.18);
    border-color: rgba(183, 68, 255, 0.65);
    color: #B744FF;
}

/* 物品面板子分类激活状态（用于筛选显示） */
.price-panel-subcategory-list .price-subcategory-item.is-active {
    border-width: 2px;
    border-color: #B744FF;
    font-weight: 600;
}

/* 同时有选中和激活状态 */
.price-panel-subcategory-list .price-subcategory-item.is-selected.is-active {
    background: rgba(183, 68, 255, 0.28);
    border-width: 2px;
    box-shadow: 0 0 6px rgba(183, 68, 255, 0.4);
}

.price-panel-subcategory-list .price-subcategory-item:hover {
    color: #B744FF;
}

.price-filter-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.price-unit-toggle {
    display: inline-flex;
    background: var(--bg-tertiary);
    border-radius: 999px;
    padding: 0.2rem;
    border: 1px solid var(--border-light);
}

.price-unit-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 0.25rem 0.4rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-unit-btn-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.price-unit-btn.active .price-unit-btn-icon,
.price-unit-btn:hover .price-unit-btn-icon {
    opacity: 1;
}

.price-unit-btn.active,
.price-unit-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.price-filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.price-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    padding-right: 0.25rem;
}

.price-group-list-inline {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 1.2rem;
    min-height: 120px;
    max-height: none;
    overflow-x: hidden;
    overflow-y: visible;
    width: 100%;
    padding-right: 0;
    align-items: stretch;
}

.price-group-module .price-group-list-inline {
    margin-top: 0.4rem;
}


@media (max-width: 1500px) {
    .price-group-list-inline {
        grid-template-columns: repeat(4, minmax(180px, 1fr));
    }
}

@media (max-width: 1200px) {
    .price-group-list-inline {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

.price-group-controls-inline {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
}

.price-group-item {
    border: 1.5px solid rgba(30, 136, 255, 0.22);
    border-radius: 12px;
    padding: 0.6rem 0.65rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--accent-blue) 4%, var(--bg-primary)),
        var(--bg-primary));
    box-shadow: none;
    position: relative;
    min-height: 96px;
}

.price-group-module.is-active .price-group-item {
    border-color: rgba(30, 136, 255, 0.28);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--accent-blue) 3%, var(--bg-primary)),
        var(--bg-primary));
}

.price-group-template-row {
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.price-group-template-row select {
    flex: 1;
    min-width: 0;
}

.price-group-item-actions {
    display: inline-flex;
    gap: 6px;
    flex-shrink: 0;
}

.price-group-item-action {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid rgba(52, 199, 89, 0.45);
    background: rgba(52, 199, 89, 0.18);
    color: #2f9e44;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: none;
}

.price-group-item-action:hover {
    background: rgba(52, 199, 89, 0.28);
    color: #1f7a35;
    border-color: rgba(52, 199, 89, 0.65);
}

.price-group-item-action--remove:hover {
    border-color: rgba(255, 59, 48, 0.7);
    color: #c62828;
    background: rgba(255, 59, 48, 0.22);
}

.price-group-item-action--remove {
    border-color: rgba(255, 59, 48, 0.55);
    background: rgba(255, 59, 48, 0.16);
    color: #d64545;
}

.price-group-item.price-group-item--no-template {
    border-color: var(--accent-blue);
    background: color-mix(in srgb, var(--accent-blue) 10%, #ffffff);
}

.price-group-module:not(.is-active) .price-group-item,
.price-group-module:not(.is-active) .price-group-item.price-group-item--no-template {
    border-color: var(--border-light);
    background: var(--bg-secondary);
    box-shadow: none;
    filter: grayscale(0.7) brightness(0.96);
}

.price-group-fields {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-group-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 0.6rem;
    align-items: center;
}

.price-group-fields input[type="number"] {
    width: 100%;
    min-width: 0;
    padding: 0.25rem 0.35rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-align: center;
}

.price-group-fields select {
    flex: 1;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.price-group-unit-select {
    flex: 0 0 auto;
    width: 3.2rem;
    padding: 0.25rem 0.3rem;
    text-align: center;
}

/* 模块级别单位切换按钮 */
.price-module-unit-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    margin-right: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border-light);
}

.price-module-unit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 24px;
    padding: 2px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s, background 0.15s;
}

.price-module-unit-btn:hover {
    opacity: 0.8;
    background: var(--bg-hover);
}

.price-module-unit-btn.active {
    opacity: 1;
    background: var(--bg-active, rgba(var(--primary-rgb), 0.2));
    box-shadow: 0 0 0 1px var(--primary-color, #6b5ce7);
}

.price-module-unit-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 区间数字旁的单位图标 */
.price-group-unit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 4px;
}

.price-group-unit-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.8;
}

.price-group-divider {
    color: var(--text-secondary);
}

.price-group-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* 屏蔽选项样式 - select 选中时的背景 */
.price-group-template-select--hide {
    background-color: rgba(255, 100, 100, 0.25) !important;
    border-color: rgba(255, 80, 80, 0.5) !important;
}

[data-theme="dark"] .price-group-template-select--hide {
    background-color: rgba(255, 80, 80, 0.2) !important;
    border-color: rgba(255, 100, 100, 0.4) !important;
}

/* 下拉列表中非屏蔽选项恢复正常背景 */
.price-group-template-select--hide option:not(.price-group-template-option--hide) {
    background-color: #fff;
    color: var(--text-primary);
}

[data-theme="dark"] .price-group-template-select--hide option:not(.price-group-template-option--hide) {
    background-color: #1f2937;
    color: var(--text-primary);
}

/* 屏蔽选项样式 - 下拉列表中的选项 */
.price-group-template-option--hide {
    background-color: rgba(255, 100, 100, 0.4) !important;
    color: #c62828 !important;
}

[data-theme="dark"] .price-group-template-option--hide {
    background-color: rgba(255, 80, 80, 0.35) !important;
    color: #ff6b6b !important;
}

.price-group-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.price-group-control-btn {
    padding: 0.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: none;
    text-align: center;
}

.price-group-control-btn--add {
    background: rgba(10, 132, 255, 0.12);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
}

.price-group-control-btn--add:hover {
    background: rgba(10, 132, 255, 0.2);
}

.price-group-control-btn--remove {
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
}

.price-group-control-btn--remove:hover {
    background: rgba(255, 59, 48, 0.2);
}

.price-group-control-btn.price-sync-to-filter-btn {
    padding: 0.7rem 3rem;
}

#price-group-add {
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
}

#price-group-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 199, 89, 0.2);
}

#price-group-remove {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
}

#price-group-remove:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 59, 48, 0.2);
}


.price-filter-columns {
    display: block; /* 改为 block，让内部 wrapper 可以居中 */
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    padding-bottom: 0.5rem;
    max-width: 100%;
    min-width: 0;
    cursor: grab;
    text-align: center; /* 让内部 inline-flex 容器居中 */
}

.price-filter-columns:active {
    cursor: grabbing;
}

/* 内部包装器：列少时居中，列多时可滚动 */
.price-columns-wrapper {
    display: inline-flex; /* inline-flex 配合父容器 text-align: center 实现居中 */
    gap: 0;
    min-width: min-content; /* 确保不会被压缩 */
    align-items: stretch;
    text-align: left; /* 恢复内部文本对齐 */
}

.price-template-column {
    min-width: 240px;
    max-width: 280px;
    background: transparent;
    border-right: 1px solid var(--border-light);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    align-self: stretch;
    /* min-height 由 JS 动态设置，确保所有列高度一致 */
}

.price-template-column:last-child {
    border-right: none;
}

.price-template-column::after {
    content: '';
    position: absolute;
    top: 12px;
    right: 0;
    width: 1px;
    height: calc(100% - 24px);
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.12), transparent);
    pointer-events: none;
}

.price-template-column:last-child::after {
    display: none;
}

.price-template-header {
    padding: 0.7rem 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-radius: 10px 10px 0 0;
}

.price-template-range {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.price-template-count {
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-left: 6px;
}

.price-template-body {
    padding: 0.35rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.price-item-card {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.2rem 0.2rem;
    border-radius: 4px;
    background: transparent;
    border: 1px solid transparent;
    cursor: grab !important; /* 物品卡片始终显示抓手光标 */
    min-height: 34px;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.price-item-manual-lock {
    margin-left: auto;
    font-size: 0.95rem;
    line-height: 1;
    color: #62b6ff;
    text-shadow: 0 0 4px rgba(98, 182, 255, 0.35);
    flex-shrink: 0;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
    user-select: none;
}

.price-item-manual-lock:hover {
    color: #ff6b6b;
    text-shadow: 0 0 6px rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.15);
    transform: scale(1.1);
}

.price-item-manual-lock:active {
    transform: scale(0.95);
}

.price-item-card.price-item-card--manual {
    background: rgba(120, 190, 255, 0.18);
    border-color: rgba(120, 190, 255, 0.55);
}

/* 大尺寸物品卡片 */
.price-item-card.price-item-card--large {
    min-height: 68px;
}

.price-item-card.price-item-card--large .price-item-icon {
    width: 55px;
    height: 55px;
}

.price-item-card.price-item-card--large .price-item-name {
    font-size: 0.85rem;
}

.price-item-card.price-item-card--large .price-item-level-badge {
    font-size: 11px;
    top: -6px;
    left: -6px;
}

.price-item-card.price-item-card--large .price-item-quality-badge {
    font-size: 11px;
    bottom: -6px;
    right: -3px;
}

.price-item-card.price-item-card--large .price-item-socket-badge {
    font-size: 6px;
    bottom: -4px;
    left: -7px;
}

/* 大模式下的价格数量信息 */
.price-item-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
}

.price-item-quantity {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
}

.price-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.price-change-up {
    color: var(--accent-green);
}

.price-change-down {
    color: var(--accent-red);
}

.price-change-flat {
    color: var(--text-secondary);
}

/* 中文模式下：涨红跌绿 */
html[lang="zh"] .price-change-up {
    color: var(--accent-red);
}

html[lang="zh"] .price-change-down {
    color: var(--accent-green);
}

.price-item-stats .price-unit-icon {
    width: 21px;
    height: 21px;
    vertical-align: middle;
}

.price-item-stats .price-divider {
    margin: 0 4px;
    color: var(--text-tertiary);
}

/* 触发降价规则的价格显示 - 紫色 */
.price-item-stats .price-discounted {
    color: #a855f7;
    font-weight: 600;
}

.price-item-card::after {
    content: '';
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.12), transparent);
    pointer-events: none;
}

.price-item-card:active {
    cursor: grabbing;
}

.price-item-card:hover {
    background: rgba(100, 180, 255, 0.15);
    border-color: rgba(100, 180, 255, 0.6);
}

.price-item-card.dragging {
    opacity: 0.6;
    background: color-mix(in srgb, var(--bg-tertiary) 75%, transparent);
}

.price-template-column.drag-over .price-template-header {
    background: color-mix(in srgb, var(--accent-blue) 12%, var(--bg-secondary));
}
.price-item-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--bg-primary);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
    position: relative;
}

/* 物品等级徽章 - 左上角 */
.price-item-level-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 9px;
    font-weight: bold;
    color: var(--text-primary);
    z-index: 2;
    text-shadow: 
        -1px -1px 0 var(--bg-primary),
        1px -1px 0 var(--bg-primary),
        -1px 1px 0 var(--bg-primary),
        1px 1px 0 var(--bg-primary);
}

/* 品质徽章 - 右下角，样式与物品等级徽章一致 */
.price-item-quality-badge {
    position: absolute;
    bottom: -4px;
    right: -1px;
    font-size: 9px;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1;
    z-index: 2;
    text-shadow: 
        -1px -1px 0 var(--bg-primary),
        1px -1px 0 var(--bg-primary),
        -1px 1px 0 var(--bg-primary),
        1px 1px 0 var(--bg-primary);
}

/* 打孔徽章 - 左下角 */
.price-item-socket-badge {
    position: absolute;
    bottom: -3px;
    left: -6px;
    font-size: 5px;
    line-height: 1;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* 稀有度徽章 - 右上角 */
.price-item-rarity-badge {
    position: absolute;
    top: -5px;
    right: -3px;
    font-size: 8px;
    line-height: 1;
    z-index: 2;
    color: var(--text-secondary);
}

.price-item-socket-badge .socket-row {
    display: flex;
    gap: 0;
}

/* 全部用⚫ */
.price-item-socket-badge .socket-dot::before {
    content: '⚫';
}

.price-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.price-item-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-item-tooltip {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 360px;
    background: rgba(0, 0, 0, 0.92);
    border: 2px solid rgba(150, 100, 50, 0.7);
    border-radius: 10px;
    padding: 0.75rem;
    color: #f3f4f6;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.price-tooltip-main {
    display: flex;
    gap: 0.75rem;
}

.price-tooltip-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.price-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.price-tooltip-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffd700;
}

.price-tooltip-desc {
    font-size: 0.8rem;
    color: #dddddd;
    line-height: 1.4;
    max-height: none;
    overflow: visible;
}

.price-tooltip-tip {
    font-size: 0.8rem;
    color: #ffd666;
    text-align: center;
    width: 100%;
    align-self: center;
}

.price-tooltip-divider--tip {
    width: 100%;
    margin: 4px 0 1px;
}

.price-tooltip-nowrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.price-tooltip-desc img {
    display: inline-block;
    vertical-align: middle;
}

.price-tooltip-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(150, 100, 50, 0.5) 20%, rgba(150, 100, 50, 0.5) 80%, transparent);
    margin: 6px 0;
}

/* 相关物品区域（同 englishName 的其他变体） */
.price-tooltip-related {
    width: 100%;
    margin-top: 6px;
    border-top: 1px solid rgba(150, 100, 50, 0.3);
    padding-top: 6px;
}

.price-tooltip-related:empty {
    display: none;
}

.price-tooltip-related-header {
    font-size: 0.75rem;
    color: #a89060;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.price-tooltip-related-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.price-tooltip-related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    background: linear-gradient(135deg, rgba(80, 60, 40, 0.4) 0%, rgba(60, 45, 30, 0.2) 100%);
    border-radius: 6px;
    border-left: 2px solid rgba(150, 100, 50, 0.5);
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.price-tooltip-related-item:hover {
    background: linear-gradient(135deg, rgba(100, 75, 50, 0.5) 0%, rgba(80, 60, 40, 0.3) 100%);
    border-left-color: rgba(200, 150, 80, 0.8);
}

.price-tooltip-related-icon {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 4px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(150, 100, 50, 0.3);
}

.price-tooltip-related-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.price-tooltip-related-name {
    font-size: 0.9rem;
    color: #e0d0a0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-tooltip-related-variant {
    font-size: 0.85rem;
    color: #a09070;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-tooltip-related-price {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #ffd700;
    font-weight: 500;
    white-space: nowrap;
}

.price-tooltip-related-unit {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.price-tooltip-related-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.price-items-panel-header {
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

/* 初始状态提示信息 */
.price-initial-message {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;  /* 占满容器宽度，确保居中 */
    height: 100%;
    min-height: 200px;
    color: var(--text-secondary);
    font-size: 1rem;
    text-align: center;
    padding: 2rem;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
}

.price-initial-load-btn {
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--accent-blue);
    background: var(--accent-blue);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.price-initial-load-btn:hover {
    background: var(--accent-blue-hover, #2563eb);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.price-initial-load-btn:active {
    transform: translateY(0);
}

[data-theme="dark"] .price-group-item {
    background: color-mix(in srgb, var(--accent-blue) 12%, #1f2937);
    border-color: rgba(30, 136, 255, 0.32);
}

[data-theme="dark"] .price-group-module.is-active .price-group-item {
    border-color: rgba(30, 136, 255, 0.38);
}

[data-theme="dark"] .price-group-module:not(.is-active) .price-group-item,
[data-theme="dark"] .price-group-module:not(.is-active) .price-group-item.price-group-item--no-template {
    background: var(--bg-secondary);
    border-color: rgba(100, 116, 139, 0.25);
}

/* 底部透明占位区域，让页面可以额外下拉 */
.price-page-bottom-spacer {
    height: 80px;
    min-height: 80px;
    flex-shrink: 0;
    background: transparent;
    pointer-events: none;
}

/* 国服加载提示弹窗 */
.cn-price-warning-message {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text-primary);
}

.cn-price-warning-heading {
    font-size: 1.1rem;
    font-weight: 700;
}

.cn-price-warning-heading--alert {
    color: var(--accent-red);
}

.cn-price-warning-text {
    font-size: 0.98rem;
    color: var(--text-secondary);
}

.cn-price-warning-text--alert {
    color: var(--accent-red);
    font-weight: 600;
}

.cn-price-warning-skip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.cn-price-warning-skip input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-blue);
}

.cn-price-warning-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

/* === 加载物价引导弹窗 === */
.price-load-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 10020;
    pointer-events: none;
}

.price-load-guide-modal.show {
    pointer-events: auto;
}

.price-load-guide-mask {
    position: fixed;
    inset: 0;
    background: transparent;
    pointer-events: auto;
    z-index: 10018;
}

.price-load-guide-mask-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.price-load-guide-content {
    position: fixed;
    left: 50%;
    top: 120px;
    transform: translateX(-50%);
    width: 360px;
    max-width: calc(100vw - 48px);
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    padding: 0.85rem 1rem;
    pointer-events: auto;
    z-index: 10022;
}

[data-theme="dark"] .price-load-guide-content {
    box-shadow: 0 24px 70px rgba(255, 255, 255, 0.18), 0 6px 18px rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.price-load-guide-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.price-load-guide-line {
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.price-load-guide-divider {
    height: 1px;
    background: var(--border-light);
    opacity: 0.7;
    margin: 0.6rem 0;
}

.price-load-guide-line--apply {
    color: var(--accent-blue);
    font-weight: 600;
}

.price-load-guide-line--view {
    color: #7c3aed;
    font-weight: 600;
}

.price-load-guide-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.price-load-guide-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--accent-blue);
}

.price-load-guide-confirm {
    padding: 0.42rem 1rem;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.price-load-guide-confirm:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.price-load-guide-confirm:active {
    transform: translateY(0);
}

.price-load-guide-highlight {
    position: fixed;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 10020;
}


.price-load-guide-highlight--apply {
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.price-load-guide-highlight--view {
    border-color: rgba(124, 58, 237, 0.9);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.18);
}

/* ============ 设置按钮和设置面板 ============ */
/* 高级设置按钮激活状态 */
.price-settings-toggle.is-active {
    background: rgba(183, 68, 255, 0.25);
    border-color: #B744FF;
    color: #B744FF;
}

.price-settings-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .price-settings-panel {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.price-settings-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.price-settings-section .price-settings-row {
    justify-content: flex-start;
}

.price-settings-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: transparent;
}

.price-settings-option:hover {
    background: rgba(183, 68, 255, 0.1);
    color: var(--text-primary);
}

.price-settings-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #B744FF;
    cursor: pointer;
}

/* checkbox 选中状态的标签样式 */
.price-settings-option input[type="checkbox"]:checked + span {
    color: var(--text-primary);
}

/* 高级设置说明信息 */
.price-settings-info {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.price-settings-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.price-settings-info-label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}

.price-settings-info-text {
    color: var(--text-secondary);
}

[data-theme="dark"] .price-settings-info {
    border-top-color: var(--border-color);
}

/* 物价物品搜索结果高亮 */
.price-item-card.search-highlight-pulse {
    animation: priceSearchHighlightPulse 0.5s ease-in-out 3;
    box-shadow: 0 0 0 3px var(--accent-blue), 0 4px 16px rgba(0, 113, 227, 0.35);
    z-index: 10;
}

@keyframes priceSearchHighlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px var(--accent-blue), 0 4px 16px rgba(0, 113, 227, 0.35);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(0, 113, 227, 0.4), 0 6px 24px rgba(0, 113, 227, 0.35);
    }
}

/* ============ 设置面板统一样式 ============ */
.price-settings-section {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

[data-theme="dark"] .price-settings-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

.price-settings-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border-light);
}

.price-settings-section .price-settings-section-title {
    margin-top: 0;
}

[data-theme="dark"] .price-settings-section-title {
    border-bottom-color: var(--border-color);
}

/* ============ 降价规则设置区域 ============ */
.price-settings-discount-section {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

[data-theme="dark"] .price-settings-discount-section {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-color);
}

.price-settings-discount-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.price-settings-add-rule {
    margin-left: auto;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.price-settings-add-rule:hover {
    border-color: rgba(183, 68, 255, 0.45);
    color: var(--accent-color);
}

.price-settings-add-rule:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.price-settings-remove-rule {
    margin-left: auto;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.price-settings-remove-rule:hover {
    border-color: rgba(183, 68, 255, 0.45);
    color: var(--accent-color);
}

.price-settings-remove-rule:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.price-settings-discount-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1.5rem;
    transition: opacity 0.2s ease;
}

.price-settings-discount-rule {
    padding-top: 0.2rem;
}

.price-settings-discount-fields.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.price-settings-discount-sentence {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 2;
}

.price-settings-discount-sentence .discount-label {
    color: var(--text-primary);
    font-weight: 500;
}

.price-settings-discount-sentence .discount-unit {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* 货币图标选择器 */
.price-settings-currency-select {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 3px;
}

.price-settings-currency-select .currency-icon {
    width: 28px;
    height: 28px;
    cursor: pointer;
    opacity: 0.4;
    border-radius: 4px;
    transition: all 0.15s ease;
    padding: 2px;
}

.price-settings-currency-select .currency-icon:hover {
    opacity: 0.7;
    background: rgba(183, 68, 255, 0.1);
}

.price-settings-currency-select .currency-icon.active {
    opacity: 1;
    background: rgba(183, 68, 255, 0.2);
    box-shadow: 0 0 0 1px var(--accent-purple);
}

/* 超小选择框 */
.price-settings-select-xs {
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    min-width: 48px;
}

.price-settings-select-xs:focus {
    outline: none;
    border-color: var(--accent-purple);
}

.price-settings-select-xs:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.price-settings-select-inline {
    margin: 0 2px;
    min-width: 55px;
}

[data-theme="dark"] .price-settings-currency-select {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .price-settings-select-xs {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.price-settings-discount-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.price-settings-input-sm {
    width: 60px;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    text-align: center;
}

.price-settings-input-sm:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(183, 68, 255, 0.2);
}

.price-settings-input-sm:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.price-settings-select-sm {
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
}

.price-settings-select-sm:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px rgba(183, 68, 255, 0.2);
}

.price-settings-select-sm:disabled {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

[data-theme="dark"] .price-settings-input-sm,
[data-theme="dark"] .price-settings-select-sm {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .price-settings-input-sm:disabled,
[data-theme="dark"] .price-settings-select-sm:disabled {
    background: rgba(255, 255, 255, 0.05);
}



