/* 
 * 电缆报价系统 - 政府类网站样式
 * 红色主题，简单整洁，正式规范
 */

:root {
    /* 政府网站配色方案 */
    --primary-red: #cc0000;        /* 主红色 */
    --primary-red-dark: #990000;   /* 深红色 */
    --primary-red-light: #ff3333;  /* 浅红色 */
    
    --secondary-blue: #003366;     /* 辅助蓝色 */
    --secondary-blue-light: #336699;
    
    --neutral-dark: #333333;       /* 深灰 */
    --neutral-medium: #666666;     /* 中灰 */
    --neutral-light: #f0f0f0;      /* 浅灰 */
    --neutral-white: #ffffff;      /* 白色 */
    
    --accent-gold: #c9a227;        /* 金色点缀 */
    --accent-green: #2d8515;       /* 绿色成功状态 */
    
    /* 间距系统 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* 阴影 */
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.2);
    
    /* 边框 */
    --border-radius-sm: 3px;
    --border-radius-md: 5px;
    --border-radius-lg: 8px;
    
    /* 字体 */
    --font-family-base: "Microsoft YaHei", "SimHei", "Microsoft JhengHei", sans-serif;
    --font-family-title: "SimSun", "NSimSun", "Microsoft YaHei", serif;
}

/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
}

body {
    font-family: var(--font-family-base);
    color: var(--neutral-dark);
    background-color: var(--neutral-white);
    line-height: 1.6;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* 头部区域 - 政府网站风格 */
.site-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--neutral-white);
    padding: var(--spacing-lg) 0;
    border-bottom: 4px solid var(--accent-gold);
    box-shadow: var(--shadow-medium);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.site-logo {
    height: 60px;
    width: 60px;
    background-color: var(--neutral-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-gold);
}

.site-logo i {
    color: var(--primary-red);
    font-size: 32px;
}

.site-title h1 {
    font-family: var(--font-family-title);
    font-size: 28px;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.site-title p {
    font-size: 14px;
    opacity: 0.9;
}

.header-info {
    text-align: right;
}

.current-time {
    font-size: 15px;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.last-update {
    font-size: 13px;
    opacity: 0.8;
}

/* 导航栏 */
.site-nav {
    background-color: var(--secondary-blue);
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--neutral-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--neutral-white);
    transform: translateY(-1px);
}

.nav-menu a.active {
    background-color: var(--primary-red);
    color: var(--neutral-white);
    box-shadow: var(--shadow-light);
}

.nav-menu i {
    font-size: 18px;
}

/* 主要内容区 */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: var(--spacing-xl) auto;
    padding: 0 var(--spacing-xl);
    width: 100%;
}

/* 控制面板 */
.control-panel {
    background-color: var(--neutral-white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-light);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--neutral-light);
}

.panel-title {
    color: var(--primary-red);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--neutral-light);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.search-section {
    margin-bottom: 0;
}

.search-box {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.search-input {
    flex: 1;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: #ffffff;
    border: 2px solid #0066cc; /* 蓝色边框（默认状态） */
    border-radius: var(--border-radius-md);
    font-size: 16px;
    transition: all 0.3s ease;
    color: #333;
}

.search-input:hover {
    background-color: #f8f9fa;
    border-color: #0055aa; /* 悬停时深蓝色 */
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.search-input:focus {
    outline: none;
    background-color: white;
    border-color: var(--primary-red); /* 聚焦时边框变红色 */
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

/* 搜索框占位符文本颜色 */
.search-input::placeholder {
    color: #6c757d;
}

.search-button {
    background-color: var(--primary-red);
    color: var(--neutral-white);
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.search-button:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-light);
}

.search-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--neutral-medium);
}

.search-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.filter-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.filter-label {
    font-weight: 500;
    color: var(--neutral-dark);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.filter-select {
    padding: var(--spacing-md);
    border: 1px solid var(--neutral-light);
    border-radius: var(--border-radius-md);
    font-size: 14px;
    background-color: var(--neutral-white);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* 价格调整控件 */
.price-adjust-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-adjust-select {
    min-width: 80px;
    text-align: center;
}

.price-adjust-step-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius-sm);
    background: #f5f5f5;
    color: var(--neutral-dark);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.price-adjust-step-btn:hover {
    background: #e0e0e0;
}

/* 全局调整提示条 */
.price-adjust-banner {
    margin: 8px 0 0 0;
    padding: 8px 16px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--border-radius-md);
    color: #7a5800;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-adjust-banner i {
    color: #f59e0b;
    flex-shrink: 0;
}

.price-adjust-banner span {
    flex: 1;
}

.price-adjust-reset-btn {
    padding: 3px 10px;
    border: 1px solid #f59e0b;
    border-radius: var(--border-radius-sm);
    background: #fff;
    color: #7a5800;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.price-adjust-reset-btn:hover {
    background: #fff8e1;
}

/* 单行调整小下拉 */
.row-price-adjust {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
}

.row-price-adjust-select {
    padding: 1px 2px;
    font-size: 11px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    color: var(--neutral-dark);
    max-width: 60px;
}

.row-price-adjust-select.adjusted {
    border-color: var(--secondary-blue-light);
    color: var(--secondary-blue);
    background: #eef4ff;
}

/* 单行已调整蓝点标记 */
.price-adjusted-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--secondary-blue-light);
    vertical-align: middle;
    margin-left: 2px;
    flex-shrink: 0;
}

/* 含税单价列 - 含调整时橙色高亮 */
.tax-included-cell.adjusted {
    color: #d97706;
    font-weight: bold;
}

/* 数据来源提示（原价小字） */
.price-original-hint {
    display: block;
    font-size: 10px;
    color: #aaa;
    text-decoration: line-through;
    line-height: 1.2;
}


.data-section {
    background-color: var(--neutral-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    border: 1px solid var(--neutral-light);
}

.table-header {
    background-color: var(--secondary-blue);
    color: var(--neutral-white);
    padding: var(--spacing-lg) var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title {
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.table-controls {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.table-controls button {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--neutral-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.table-controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.data-table-container {
    overflow-x: auto;
}

.cable-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cable-table thead {
    background-color: var(--neutral-light);
}

.cable-table th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    color: var(--secondary-blue);
    border-bottom: 2px solid var(--neutral-medium);
    white-space: nowrap;
}

.cable-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--neutral-light);
    vertical-align: middle;
}

.cable-table tbody tr {
    transition: background-color 0.2s ease;
}

.cable-table tbody tr:hover {
    background-color: rgba(204, 0, 0, 0.05);
}

.cable-table tbody tr:nth-child(even) {
    background-color: var(--neutral-white);
}

.cable-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.model-cell {
    font-weight: 500;
    color: var(--secondary-blue);
}

.price-cell {
    font-weight: bold;
    color: var(--primary-red);
    font-size: 15px;
}

.tax-included-cell {
    font-weight: bold;
    color: #ff6600; /* 橙色表示含税价格 */
    font-size: 15px;
}

.category-cell {
    color: var(--neutral-medium);
    font-size: 13px;
}

.size-cell {
    font-family: monospace;
    background-color: var(--neutral-light);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
}

.core-cell {
    text-align: center;
}

/* 分页控制 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background-color: var(--neutral-white);
    border-top: 1px solid var(--neutral-light);
}

.pagination-button {
    background-color: var(--neutral-white);
    color: var(--secondary-blue);
    border: 1px solid var(--neutral-light);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-button:hover {
    background-color: var(--neutral-light);
    border-color: var(--secondary-blue);
}

.pagination-button.active {
    background-color: var(--primary-red);
    color: var(--neutral-white);
    border-color: var(--primary-red);
}

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    margin: 0 var(--spacing-md);
    font-size: 14px;
    color: var(--neutral-dark);
    font-weight: 500;
}

.pagination-info span {
    font-weight: bold;
    color: var(--primary-red);
    margin: 0 2px;
}

.pagination-size {
    margin-left: auto;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--neutral-dark);
}

/* 数据统计 */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background-color: var(--neutral-white);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--neutral-light);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(204, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    color: var(--primary-red);
    font-size: 24px;
}

.stat-title h3 {
    color: var(--secondary-blue);
    font-size: 16px;
    margin-bottom: var(--spacing-xs);
}

.stat-title p {
    color: var(--neutral-medium);
    font-size: 12px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-red);
    margin-bottom: var(--spacing-xs);
}

.stat-desc {
    color: var(--neutral-medium);
    font-size: 14px;
}

/* 底部信息 */
.site-footer {
    background-color: var(--secondary-blue);
    color: var(--neutral-white);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xxl);
    border-top: 4px solid var(--primary-red);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: var(--spacing-lg);
    color: var(--neutral-white);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--spacing-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-section a:hover {
    color: var(--neutral-white);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .header-info {
        text-align: center;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .filter-section {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }

    /* 手机端隐藏统计卡片 */
    .stats-section {
        display: none !important;
    }

    /* 手机端隐藏筛选区域 */
    .filter-section {
        display: none !important;
    }

    /* 手机端隐藏搜索提示文字 */
    .search-tips {
        display: none !important;
    }

    /* 手机端搜索统计信息紧凑竖排 */
    .search-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        font-size: 12px;
    }

    .search-info {
        flex-direction: column;
        gap: 2px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0 var(--spacing-md);
    }
    
    .control-panel {
        padding: var(--spacing-lg);
    }
    
    .cable-table th,
    .cable-table td {
        padding: var(--spacing-sm);
    }
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--neutral-light);
    border-top: 4px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-lg);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--secondary-blue);
    font-size: 18px;
    font-weight: 500;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: var(--spacing-xxl);
    color: var(--neutral-medium);
}

.empty-state i {
    font-size: 48px;
    color: var(--neutral-light);
    margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
    color: var(--secondary-blue);
    margin-bottom: var(--spacing-md);
}

/* 错误状态 */
.error-state {
    background-color: rgba(204, 0, 0, 0.1);
    border: 1px solid var(--primary-red);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.error-state i {
    color: var(--primary-red);
    margin-right: var(--spacing-md);
}

.error-state .error-message {
    color: var(--primary-red);
    font-weight: 500;
}

.error-state .error-details {
    color: var(--neutral-medium);
    font-size: 14px;
    margin-top: var(--spacing-sm);
}

/* 警告状态 */
.warning-state {
    background-color: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    animation: fadeIn 0.3s ease;
}

.warning-state i {
    color: #ffc107;
    margin-right: var(--spacing-md);
}

.warning-state .warning-message {
    color: #856404;
    font-weight: 500;
}

.warning-state .warning-details {
    color: var(--neutral-medium);
    font-size: 14px;
    margin-top: var(--spacing-sm);
}

/* 搜索高亮样式 */
.search-highlight {
    background-color: #fff3cd;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 500;
}

/* 搜索输入框状态 */
.search-input.loading {
    border-color: #ffc107;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffc107' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 11-6.219-8.56'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.search-input.success {
    border-color: var(--accent-green);
}

.search-input.error {
    border-color: var(--primary-red);
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.pulse {
    animation: pulse 2s infinite ease-in-out;
}

/* 数据加载指示器 */
.data-loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--neutral-light);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.hidden { display: none !important; }

/* 新功能样式 */

/* 数量输入框 */
.quantity-input {
    width: 80px !important;
    padding: 4px 8px !important;
    border: 1px solid #ddd !important;
    border-radius: var(--border-radius-sm) !important;
    text-align: center !important;
    font-size: 14px !important;
}

.quantity-input:focus {
    border-color: var(--primary-red) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.2) !important;
}

/* 金额单元格 */
.amount-cell {
    font-weight: 600 !important;
    color: var(--primary-red) !important;
}

/* 表格调整 */
.quantity-cell {
    text-align: center !important;
}

/* 金额变化动画 */
@keyframes amountUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.amount-updated {
    animation: amountUpdate 0.3s ease !important;
}

/* 智能排序提示 */
.sort-info {
    font-size: 12px;
    color: var(--neutral-medium);
    margin-left: 5px;
    font-style: italic;
}

/* 部分匹配样式 */
.search-partial-match {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    padding-left: 5px;
}

/* 完全匹配样式 */
.search-exact-match {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 3px solid var(--accent-green);
    padding-left: 5px;
    font-weight: 600;
}

/* 选中行样式 */
.selected-row {
    background-color: rgba(204, 0, 0, 0.08) !important;
    border-left: 3px solid var(--primary-red) !important;
    font-weight: 500;
}

.selected-row td {
    position: relative;
}

.selected-row::after {
    content: "✓";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-red);
    font-weight: bold;
    font-size: 14px;
}

/* 选中信息面板 */
#selection-info {
    animation: fadeIn 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.selected-quantity {
    padding: 4px 8px !important;
    border: 1px solid #ddd !important;
    border-radius: var(--border-radius-sm) !important;
    text-align: center !important;
}

.selected-quantity:focus {
    border-color: var(--primary-red) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.2) !important;
}

/* 确认报价单弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10002;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--border-radius-lg);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    z-index: 10003;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
}

.confirmation-info {
    display: flex;
    gap: var(--spacing-xl);
    background: #f8f9fa;
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.info-item i {
    color: var(--primary-red);
}

.info-item span {
    color: var(--neutral-medium);
}

.info-item span span {
    color: var(--secondary-blue);
    font-weight: 600;
}

#confirmationTotalAmount {
    color: var(--primary-red);
}

.confirmation-table-container {
    border: 1px solid #eee;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
    max-height: 40vh;
    overflow-y: auto;
}

.confirmation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.confirmation-table th {
    background-color: #f5f7fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--secondary-blue);
    border-bottom: 2px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1;
}

.confirmation-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.confirmation-table tr:nth-child(even) {
    background-color: #fafbfd;
}

.confirmation-table tr:hover {
    background-color: #f0f5ff;
}

.confirmation-table .text-right {
    text-align: right;
}

.confirmation-table .text-center {
    text-align: center;
}

.confirmation-table input[type="number"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    text-align: center;
    font-size: 14px;
}

.confirmation-table textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.confirmation-table button {
    padding: 6px 12px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
    white-space: nowrap;
}

.confirmation-table button:hover {
    background: var(--primary-red-dark);
}

.confirmation-table .delete-btn {
    background: #dc3545;
}

.confirmation-table .delete-btn:hover {
    background: #c82333;
}

.confirmation-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding-top: var(--spacing-lg);
    border-top: 1px solid #eee;
}

.action-button {
    padding: 10px 24px;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.action-button i {
    font-size: 16px;
}

#printConfirmationButton {
    background: var(--secondary-blue);
    color: white;
}

#printConfirmationButton:hover {
    background: var(--secondary-blue-light);
}

#exportConfirmationButton {
    background: var(--accent-green);
    color: white;
}

#exportConfirmationButton:hover {
    background: #25750f;
}

#clearConfirmationButton {
    background: #dc3545;
    color: white;
}

#clearConfirmationButton:hover {
    background: #c82333;
}

.action-button.danger {
    background: #dc3545;
}

.action-button.danger:hover {
    background: #c82333;
}

.empty-row {
    background-color: transparent !important;
}

.empty-row:hover {
    background-color: transparent !important;
}

/* 确认单按钮计数 */
#confirmationCount {
    font-weight: 600;
    color: var(--accent-green);
}

/* 确认单按钮活动状态 */
.table-controls button.active {
    background-color: var(--primary-red) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.3);
}

.table-controls button.active:hover {
    background-color: var(--primary-red-dark) !important;
}

/* 动画效果 */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 98%;
        max-height: 95vh;
    }
    
    .confirmation-info {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
        justify-content: center;
    }
    
    .confirmation-table {
        font-size: 13px;
    }
    
    .confirmation-table th,
    .confirmation-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
        width: 100%;
    }
    
    .modal-body {
        padding: var(--spacing-lg);
    }
}

/* === 初始状态样式 === */

.initial-state-cell {
    height: 320px;
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    border: 2px dashed rgba(204, 0, 0, 0.15);
    border-radius: 16px;
    padding: 40px 20px;
}

.initial-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.initial-state-icon {
    font-size: 60px;
    color: var(--primary-red);
    margin-bottom: 24px;
    background: rgba(204, 0, 0, 0.08);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.initial-state-text h3 {
    font-size: 28px;
    color: var(--neutral-dark);
    margin: 0 0 12px 0;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.initial-state-text p {
    font-size: 16px;
    color: var(--neutral-medium);
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.initial-state-tips {
    font-size: 14px;
    color: var(--secondary-blue) !important;
    margin-top: 16px !important;
    padding: 12px 16px;
    background: rgba(59, 142, 234, 0.07);
    border-radius: 8px;
    border-left: 3px solid var(--secondary-blue);
}

.initial-state-tips i {
    color: var(--secondary-blue);
    margin-right: 6px;
}

.initial-state-actions {
    margin-top: 28px;
}

.initial-state-button {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-red), #b30000);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(204, 0, 0, 0.25);
}

.initial-state-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(204, 0, 0, 0.35);
    background: linear-gradient(135deg, #b30000, #990000);
}

.initial-state-button:active {
    transform: translateY(0);
}

.initial-state-button i {
    font-size: 18px;
}

/* 空数据状态动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.initial-state-content {
    animation: fadeInUp 0.6s ease-out;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .initial-state-cell {
        height: auto;
        padding: 30px 15px;
    }
    
    .initial-state-icon {
        font-size: 48px;
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    .initial-state-text h3 {
        font-size: 24px;
    }
    
    .initial-state-text p {
        font-size: 14px;
    }
    
    .initial-state-button {
        padding: 12px 24px;
        font-size: 15px;
    }
}