/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

/* 容器和布局 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    background-color: white;
    height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* 标题栏 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.header h1 {
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 8px;
}

/* 主内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex: 1;
    min-height: 0;
}

/* 区域标题 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #dee2e6;
    gap: 20px;
}

.section-header h2 {
    color: #495057;
    font-size: 1.3rem;
    font-weight: 500;
}

/* 项目选择区域 */
.items-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 报价单区域 */
.quote-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 搜索容器 */
.search-container {
    flex: 0 0 200px;
}

.search-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 项目名称输入框 */
.project-name-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-name-label {
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.project-name-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.project-name-input:focus {
    outline: none;
    border-color: #007bff;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 项目容器 */
.items-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    min-height: 0;
}

.category-group {
    /* margin-bottom: 16px; */
}

.category-header {
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 14px;
}

.category-items {
    padding: 8px;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.item-card:hover {
    border-color: #007bff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.15);
}

.item-card.selected {
    border-color: #007bff;
    background-color: #e7f3ff;
}

.item-card.single-select.selected {
    background-color: #d4edda;
    border-color: #28a745;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 2px;
    font-size: 14px;
    line-height: 1.3;
}

.item-price {
    color: #007bff;
    font-weight: 600;
    font-size: 14px;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.selection-indicator {
    width: 18px;
    height: 18px;
    border: 2px solid #ced4da;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}

.item-card.selected .selection-indicator {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.item-card.single-select.selected .selection-indicator {
    background-color: #28a745;
    border-color: #28a745;
}

/* 报价单区域 */
.quote-container {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    overflow-y: auto;
    min-height: 0;
}

.empty-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-style: italic;
}

.quote-info {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6c757d;
}

/* 报价单分类样式 */
.quote-category-group {
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.quote-category-header {
    background-color: #f8f9fa;
    padding: 8px 12px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.quote-category-items {
    background-color: white;
}

.quote-category-items .quote-item {
    border-bottom: 1px solid #f1f3f4;
}

.quote-category-items .quote-item:last-child {
    border-bottom: none;
}

.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.quote-item:last-child {
    border-bottom: none;
}

.quote-item-info {
    flex: 1;
}

.quote-item-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 4px;
}

.quote-item-details {
    font-size: 0.9rem;
    color: #6c757d;
}

/* 报价单项目 - PC端只显示详情和删除 */
.quote-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.quote-item:last-child {
    border-bottom: none;
}

.quote-item-info {
    flex: 1;
}

.quote-item-name {
    font-weight: 500;
    color: #212529;
    margin-bottom: 4px;
}

.quote-item-details {
    font-size: 0.9rem;
    color: #6c757d;
}

.quote-quantity {
    color: #007bff;
    font-weight: 600;
}

.quote-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quote-item-subtotal {
    font-weight: 600;
    color: #007bff;
    min-width: 80px;
    text-align: right;
}

.quote-item-controls .remove-btn,
.quote-item-right .remove-btn {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 3px;
    font-size: 16px;
}

.quote-item-controls .remove-btn:hover,
.quote-item-right .remove-btn:hover {
    background-color: #f8d7da;
}

.quote-item-subtotal {
    font-weight: 600;
    color: #007bff;
    min-width: 80px;
    text-align: right;
}

/* 报价单汇总 */
.quote-summary {
    margin-top: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-row:first-child {
    border-bottom: 1px solid #e9ecef;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 600;
    color: #007bff;
    border-top: 2px solid #007bff;
    margin-top: 10px;
    padding-top: 12px;
}

/* 按钮样式 */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 加载指示器 */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.loading-indicator.hidden {
    display: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6c757d;
    text-align: center;
}

.empty-items p {
    margin: 0;
    font-size: 16px;
    font-style: italic;
}

.empty-items::before {
    content: "🔍";
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    /* 使用动态视口高度 */
    :root {
        --vh: 1vh;
    }
    
    body {
        height: calc(var(--vh, 1vh) * 100);
        overflow-x: hidden;
    }
    
    .container {
        padding: 8px;
        min-height: calc(var(--vh, 1vh) * 100);
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }
    
    .header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 10px 0;
        margin-bottom: 10px;
        flex-shrink: 0;
    }
    
    .header h1 {
        font-size: 1.3rem;
        margin-bottom: 0;
    }
    
    /* 隐藏顶部按钮 */
    .header-actions {
        display: none;
    }
    
    /* 主内容区域改为单列布局 */
    .main-content {
        display: flex;
        flex-direction: column;
        gap: 10px;
        flex: 1;
        min-height: 0;
    }
    
    /* 项目选择区域 - 占据主要空间 */
    .items-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        margin-bottom: 0;
    }
    
    /* 隐藏报价单区域 */
    .quote-section {
        display: none;
    }
    
    .section-header {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        margin-bottom: 8px;
        padding-bottom: 6px;
        flex-shrink: 0;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
        margin-bottom: 0;
        text-align: center;
    }
    
    .project-name-container {
        flex: none;
        order: 1;
    }
    
    .project-name-label {
        font-size: 13px;
    }
    
    .project-name-input {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .search-container {
        flex: none;
        order: 2;
    }
    
    .search-input {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .items-container {
        flex: 1;
        border-radius: 4px;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
        min-width: 0;
    }
    
    /* 显示移动端汇总区域 */
    .mobile-quote-summary {
        display: block !important;
        margin-top: 10px;
        margin-bottom: 10px;
        padding: 12px;
        background-color: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #dee2e6;
        flex-shrink: 0;
    }
    
    .mobile-quote-summary .summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        font-size: 13px;
    }
    
    .mobile-quote-summary .summary-row:not(:last-child) {
        border-bottom: 1px solid #e9ecef;
    }
    
    .mobile-quote-summary .summary-row.total {
        font-size: 15px;
        font-weight: 600;
        color: #007bff;
        border-top: 2px solid #007bff;
        margin-top: 8px;
        padding-top: 8px;
        border-bottom: none;
    }
    
    /* 显示底部按钮 - 正常流式布局 */
    .mobile-bottom-actions {
        display: flex !important;
        position: static;
        background: white;
        padding: 12px 15px;
        gap: 10px;
        flex-shrink: 0;
        margin-top: 10px;
    }
    
    .mobile-bottom-actions .btn {
        flex: 1;
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 8px;
        text-align: center;
        justify-content: center;
        font-weight: 500;
    }
    

}
    
    /* 移动端项目卡片优化 - 添加数量编辑 */
    .category-header {
        padding: 6px 8px;
        font-size: 12px;
        font-weight: 600;
    }
    
    .category-items {
        padding: 4px;
    }
    
    .item-card {
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        margin-bottom: 6px;
        gap: 6px;
    }
    
    .item-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .item-info {
        flex: 1;
        min-width: 0;
    }
    
    .item-name {
        font-size: 13px;
        line-height: 1.2;
        margin-bottom: 2px;
        word-break: break-word;
    }
    
    .item-price {
        font-size: 12px;
        font-weight: 600;
        color: #007bff;
        /* margin-bottom: 4px; */
    }
    
    .item-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .selection-indicator {
        width: 18px;
        height: 18px;
        border-width: 1px;
        font-size: 11px;
    }
    
    /* 移动端项目卡片的数量控制器 */
    .item-quantity-controls {
        display: none; /* 默认隐藏 */
        align-items: center;
        gap: 6px;
        margin-top: 6px;
        padding: 6px;
        background-color: #f8f9fa;
        border-radius: 4px;
    }
    
    .item-card.selected .item-quantity-controls {
        display: flex; /* 选中时显示 */
    }
    
    .item-quantity-controls .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .item-quantity-controls .quantity-input {
        width: 60px;
        padding: 4px 6px;
        font-size: 14px;
        text-align: center;
        border-radius: 4px;
    }
    
    /* 移动端报价单项目优化 - 改为上下布局 */
    .quote-category-header {
        padding: 6px 8px;
        font-size: 12px;
        font-weight: 600;
    }
    
    .quote-item {
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        gap: 6px;
    }
    
    .quote-item-info {
        flex: 1;
        min-width: 0;
    }
    
    .quote-item-name {
        font-size: 12px;
        line-height: 1.2;
        margin-bottom: 2px;
        word-break: break-word;
    }
    
    .quote-item-details {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    /* 数量控制和总价分两行显示 */
    .quote-item-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        flex-shrink: 0;
        margin-bottom: 4px;
    }
    
    .quantity-input {
        width: 45px;
        padding: 3px 5px;
        font-size: 12px;
        text-align: center;
    }
    
    .quantity-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
        border-radius: 3px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .remove-btn {
        padding: 3px 6px;
        font-size: 14px;
        border-radius: 3px;
        margin-left: 6px;
    }
    
    /* 小计单独一行显示 */
    .quote-item-subtotal {
        font-size: 13px;
        font-weight: 600;
        text-align: center;
        color: #007bff;
        background-color: #f8f9fa;
        padding: 4px;
        border-radius: 3px;
    }
    
    /* 汇总区域优化 - 更紧凑 */
    .quote-summary {
        margin-top: 8px;
        padding: 6px;
        flex-shrink: 0;
        border-radius: 4px;
    }
    
    .summary-row {
        padding: 3px 0;
        font-size: 11px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .summary-row.total {
        font-size: 13px;
        font-weight: 600;
        padding-top: 6px;
        margin-top: 6px;
        border-top: 1px solid #007bff;
    }
    
    .quote-info {
        flex-direction: column;
        gap: 1px;
        font-size: 9px;
        text-align: center;
        margin-bottom: 4px;
    }
    
    /* 空状态优化 */
    .empty-quote {
        height: 100px;
        font-size: 12px;
    }
    
    .empty-items {
        padding: 20px 10px;
    }
    
    .empty-items::before {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .empty-items p {
        font-size: 12px;
    }
    
    .category-header {
        padding: 10px 12px;
        font-size: 14px;
        font-weight: 600;
    }
    
    .category-items {
        padding: 8px;
    }
    
    /* 优化项目卡片布局 - 价格和选择按钮在同一行 */
    .item-card {
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        margin-bottom: 6px;
        gap: 12px;
    }
    
    .item-info {
        flex: 1;
        min-width: 0;
    }
    
    .item-name {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 2px;
        word-break: break-word;
    }
    
    .item-price {
        font-size: 14px;
        font-weight: 600;
        color: #007bff;
    }
    
    .item-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .selection-indicator {
        width: 18px;
        height: 18px;
        border-width: 1px;
        font-size: 12px;
    }
    
    /* 报价单项目优化 */
    .quote-item {
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        gap: 12px;
    }
    
    .quote-item-info {
        flex: 1;
        min-width: 0;
    }
    
    .quote-item-name {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 2px;
        word-break: break-word;
    }
    
    .quote-item-details {
        font-size: 12px;
    }
    
    .quote-item-controls {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }
    
    .quantity-input {
        width: 60px;
        padding: 4px 6px;
        font-size: 14px;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
        border-radius: 4px;
    }
    
    .remove-btn {
        padding: 6px;
        font-size: 18px;
        border-radius: 4px;
    }
    
    .quote-item-subtotal {
        font-size: 14px;
        font-weight: 600;
        min-width: 70px;
        text-align: right;
    }
    
    /* 汇总区域优化 */
    .quote-summary {
        margin-top: 16px;
        padding: 12px;
        border-radius: 4px;
    }
    
    /* 报价单分类样式 - 移动端 */
    .quote-category-group {
        margin-bottom: 12px;
        border-radius: 4px;
    }
    
    .quote-category-header {
        padding: 8px 12px;
        font-size: 13px;
        font-weight: 600;
    }
    
    .quote-category-items .quote-item {
        padding: 8px 12px;
    }
    
    .summary-row {
        padding: 6px 0;
        font-size: 14px;
    }
    
    .summary-row.total {
        font-size: 16px;
        padding-top: 10px;
        margin-top: 8px;
    }
    
    .quote-info {
        flex-direction: row;
        gap: 16px;
        font-size: 12px;
        justify-content: center;
    }
    
    /* 空状态优化 */
    .empty-quote {
        height: 200px;
        font-size: 14px;
    }
    
    .empty-items {
        padding: 30px 20px;
    }
    
    .empty-items::before {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .empty-items p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 6px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .header-actions .btn {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .items-container {
        max-height: 45vh;
    }
    
    .quote-container {
        max-height: 35vh;
    }
    
    .item-card {
        padding: 8px 10px;
        gap: 10px;
    }
    
    .item-name {
        font-size: 13px;
    }
    
    .item-price {
        font-size: 13px;
    }
    
    .selection-indicator {
        width: 16px;
        height: 16px;
        font-size: 11px;
    }
    
    .quote-item {
        padding: 8px 10px;
        gap: 10px;
    }
    
    .quote-item-name {
        font-size: 13px;
    }
    
    .quote-item-details {
        font-size: 11px;
    }
    
    .quantity-input {
        width: 50px;
        font-size: 13px;
    }
    
    .quantity-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }
    
    .quote-item-subtotal {
        font-size: 13px;
        min-width: 60px;
    }
    
    .quote-info {
        flex-direction: column;
        gap: 4px;
        font-size: 11px;
    }
}

/* 移动端底部按钮 - 默认隐藏 */
.mobile-bottom-actions {
    display: none;
}

/* 移动端汇总区域 - 默认隐藏 */
.mobile-quote-summary {
    display: none;
}

/* 移动端报价单弹窗 */
.mobile-quote-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
}

.mobile-quote-modal.show {
    display: block;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.mobile-quote-modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close-btn:hover {
    background-color: #f8f9fa;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    min-height: 0;
}

.modal-quote-info {
    margin-bottom: 16px;
}

.modal-project-name {
    font-size: 16px;
    font-weight: 500;
    color: #495057;
    text-align: center;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 6px;
}

.modal-quote-info .quote-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.modal-quote-container {
    margin-bottom: 16px;
}

.modal-quote-summary {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.modal-quote-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

.modal-quote-summary .summary-row:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}

.modal-quote-summary .summary-row.total {
    font-size: 16px;
    font-weight: 600;
    color: #007bff;
    border-top: 2px solid #007bff;
    margin-top: 8px;
    padding-top: 12px;
    border-bottom: none;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.btn-large {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    justify-content: center;
}

/* PC端项目卡片的数量控制器 */
.item-quantity-controls {
    display: none; /* 默认隐藏 */
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-top: 1px solid #e9ecef;
}

.item-card.selected .item-quantity-controls {
    display: flex; /* 选中时显示 */
}

/* PC端内联数量控制器 - 和选中按钮在同一行 */
.item-quantity-controls-inline {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
}

.item-quantity-controls-inline .quantity-btn,
.item-quantity-controls .quantity-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #ced4da;
    background-color: #fff;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.item-quantity-controls-inline .quantity-btn:hover,
.item-quantity-controls .quantity-btn:hover {
    background-color: #e9ecef;
}

.item-quantity-controls-inline .quantity-input,
.item-quantity-controls .quantity-input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
    appearance: textfield; /* 标准属性 */
    -moz-appearance: textfield; /* Firefox */
}

/* 隐藏Chrome、Safari、Edge的number输入框箭头 */
.item-quantity-controls-inline .quantity-input::-webkit-outer-spin-button,
.item-quantity-controls-inline .quantity-input::-webkit-inner-spin-button,
.item-quantity-controls .quantity-input::-webkit-outer-spin-button,
.item-quantity-controls .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 项目卡片布局调整 - 选中对号在最右侧 */
.item-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
    flex-direction: column;
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}