* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* 登录模态框样式 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.login-container {
    background-color: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
    margin: 20px 0;
}

@media (max-height: 600px) {
    .login-container {
        padding: 1.5rem;
        max-height: 85vh;
    }
    
    .login-title {
        font-size: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .login-form .input-group {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .login-modal {
        padding: 10px;
    }
    
    .login-container {
        padding: 1.25rem;
    }
    
    .login-title {
        font-size: 1.25rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #1e293b;
}

.login-form .input-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #475569;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-btn:hover {
    background-color: #2563eb;
}

.login-error {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    text-align: center;
    font-size: 0.875rem;
}

.login-hint {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 4px;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.4;
}

.register-link {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.register-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

.forgot-password-link {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.forgot-password-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

.admin-btn, .logout-btn {
    transition: all 0.2s;
}

.admin-btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

.logout-btn:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
}

.user-info-btn {
    transition: all 0.2s;
}

.user-info-btn:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

/* 账户信息模态框样式 */
.user-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    padding: 20px;
}

.user-info-container {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.user-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8fafc;
}

.user-info-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

.user-info-content {
    padding: 1.5rem;
}

.user-info-loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-size: 1rem;
}

.user-info-success {
    background: #dcfce7;
    color: #166534;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.user-info-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.user-info-group {
    margin-bottom: 1.5rem;
}

.user-info-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.user-info-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.user-info-group input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.user-info-value {
    padding: 0.75rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
    color: #1f2937;
}

.user-info-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.user-info-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
}

.user-info-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

/* 当只有两个按钮时的样式 */
.user-info-actions:has(.user-info-btn:nth-child(2):last-child) {
    gap: 2rem;
}

.user-info-btn {
    flex: 1;
    padding: 1rem 0.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: transparent;
    min-height: 90px;
}

.btn-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    transition: all 0.2s;
}

.save-btn {
    color: #10b981;
}

.save-btn:hover {
    background-color: #f0fdf4;
    transform: translateY(-2px);
}

.save-btn:hover .btn-icon {
    transform: scale(1.1);
}

.password-btn {
    color: #3b82f6;
}

.password-btn:hover {
    background-color: #eff6ff;
    transform: translateY(-2px);
}

.password-btn:hover .btn-icon {
    transform: scale(1.1);
}

.logout-btn {
    color: #ef4444;
}

.logout-btn:hover {
    background-color: #fef2f2;
    transform: translateY(-2px);
}

.logout-btn:hover .btn-icon {
    transform: scale(1.1);
}

@media (max-width: 480px) {
    .user-info-modal {
        padding: 10px;
    }
    
    .user-info-container {
        padding: 1rem;
    }
    
    .user-info-header {
        padding: 1rem;
    }
    
    .user-info-content {
        padding: 1rem;
    }
    
    .user-info-header h2 {
        font-size: 1.25rem;
    }
}

/* 移动端顶部用户菜单 */
.mobile-header-right {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

/* 响应式设计 - 手机端显示顶部用户菜单 */
@media (max-width: 768px) {
    .mobile-header-right {
        display: block;
    }
    
    /* 隐藏顶部的用户菜单按钮，使用移动端顶部用户菜单 */
    .header .user-menu-container {
        display: none;
    }
}

/* 确保在小屏幕上内容正常显示 */
@media (max-width: 480px) {
    .container {
        padding-bottom: 20px;
    }
}

/* 管理员面板样式 */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.admin-container {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f8fafc;
}

.admin-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1f2937;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
}

.close-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.admin-content {
    padding: 1.5rem;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.admin-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.admin-filter input {
    flex: 1;
    min-width: 150px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    outline: none;
}

.admin-filter input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.admin-filter select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    outline: none;
}

.admin-filter select:focus {
    border-color: #3b82f6;
}

.admin-loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-size: 1rem;
}

.users-table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.users-table th {
    background-color: #1e293b;
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.users-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.users-table tbody tr:hover {
    background-color: #f8fafc;
}

.admin-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #7c3aed;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.online-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.online-status.online {
    background-color: #dcfce7;
    color: #166534;
}

.online-status.offline {
    background-color: #f3f4f6;
    color: #6b7280;
}

.expiry-input {
    padding: 0.375rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    font-family: inherit;
}

.expiry-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.toggle-btn {
    background-color: #3b82f6;
    color: white;
}

.toggle-btn:hover {
    background-color: #2563eb;
}

.delete-btn {
    background-color: #ef4444;
    color: white;
}

.delete-btn:hover {
    background-color: #dc2626;
}

body {
    background-color: #f9fafb;
    color: #333;
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
}

.header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0 0.5rem;
}

.header p {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 0;
}

.header-icon {
    width: 2rem;
    height: 2rem;
    color: #2563eb;
    margin-right: 0.5rem;
}

/* 用户菜单 */
.user-menu-container {
    position: relative;
}

.user-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.user-menu-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.user-icon {
    width: 20px;
    height: 20px;
    color: #4b5563;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 100;
    display: none;
    animation: slideDown 0.2s ease;
}

.user-dropdown.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    color: #374151;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

.dropdown-icon {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    color: #6b7280;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

/* 导航标签样式 - 修改为平均分布 */
.nav-tabs {
    display: flex;
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1.5rem;
    background-color: white;
    border-radius: 0.5rem 0.5rem 0 0;
}

.nav-tab {
    flex: 1; /* 平均分配空间 */
    padding: 1rem 1.5rem;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s;
    color: #6b7280;
    background-color: white;
    border: none;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-tab.active {
    color: #2563eb;
    background-color: #eff6ff;
    border-bottom-color: #2563eb;
}

.nav-tab:hover:not(.active) {
    color: #374151;
    background-color: #f9fafb;
}

/* 主要计算器容器 */
.calculator-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* 内容区域 */
.content {
    padding: 1.5rem;
}

/* 生成报价表按钮样式 - 修改：移动到按钮组下面 */
.quotation-btn-container {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.quotation-btn {
    background-color: #8b5cf6;
    color: white;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
}

.quotation-btn:hover {
    background-color: #7c3aed;
}

.quotation-btn-icon {
    width: 1.125rem;
    height: 1.125rem;
}

/* 自提货报价表按钮样式 */
.self-pickup-btn {
    background-color: #10b981;
}

.self-pickup-btn:hover {
    background-color: #0da271;
}

/* 公式介绍区域 - 修改为下拉式 */
.formula-info {
    background-color: #eff6ff;
    padding: 0;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #1e40af;
    overflow: hidden;
}

/* 下拉标题区域 */
.formula-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.15s;
}

.formula-header:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

.formula-header-content {
    display: flex;
    align-items: flex-start;
}

.info-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #2563eb;
    margin-top: 0.125rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.formula-title {
    font-weight: 600;
    color: #1e40af;
}

/* 下拉箭头图标 */
.collapse-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #2563eb;
    transition: transform 0.3s ease;
}

.collapse-icon.expanded {
    transform: rotate(180deg);
}

/* 公式内容区域 - 初始隐藏 */
.formula-content {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.formula-content.expanded {
    padding: 1rem;
    max-height: 500px;
}

.formula-equation {
    font-family: monospace;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
}

.param-list p {
    margin: 0.25rem 0;
}

/* 优化后的输入区域布局 - 新的比例 */
.input-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .input-container {
        grid-template-columns: 45% 55%; /* 优化比例：输入区域45%，结果区域55% */
    }
}

@media (min-width: 1024px) {
    .input-container {
        grid-template-columns: 40% 60%; /* 大屏幕进一步优化比例 */
    }
}

/* 输入组样式 */
.input-group {
    margin-bottom: 1.25rem; /* 增加间距 */
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 0.875rem; /* 增加内边距 */
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.15s;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.input-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* 价格更新日期显示 */
.price-date {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.5rem;
    text-align: right;
    font-style: italic;
}

/* 价格执行期显示 */
.price-date-info {
    font-size: 0.75rem;
    color: #059669;
    margin-top: 0.375rem;
    padding: 0.5rem;
    background-color: #f0fdf4;
    border-radius: 0.375rem;
    border-left: 3px solid #10b981;
}

/* 匹配区间显示 - 初始隐藏 */
.match-box {
    background-color: #dbeafe;
    padding: 0.875rem; /* 增加内边距 */
    border-radius: 0.5rem;
    margin-bottom: 1.25rem; /* 增加间距 */
    display: none; /* 初始隐藏 */
}

.match-box.show {
    display: block; /* 有数据时显示 */
}

.match-text {
    font-size: 0.875rem;
    color: #1e40af;
    line-height: 1.4;
}

.match-text strong {
    font-weight: 600;
}

/* 按钮组样式 - 修改：包含计算、重置和报表按钮 */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* 计算按钮 */
.calculate-btn {
    flex: 1;
    background-color: #2563eb;
    color: white;
    padding: 0.75rem 1rem; /* 增加按钮高度 */
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calculate-btn:hover {
    background-color: #1d4ed8;
}

/* 重置按钮 */
.reset-btn {
    flex: 1;
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 0.75rem 1rem; /* 增加按钮高度 */
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.reset-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
}

/* 结果区域 - 优化比例后增加内容高度 */
.result-container {
    background-color: #f9fafb;
    padding: 1.25rem; /* 增加内边距 */
    border-radius: 0.5rem;
    height: 100%; /* 使结果区域高度与输入区域一致 */
    display: flex;
    flex-direction: column;
}

.result-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.result-note {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    border-left: 3px solid #3b82f6;
}

.result-placeholder {
    color: #6b7280;
    text-align: center;
    padding: 2rem 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 价格结果显示 - 初始隐藏 */
.price-result {
    display: none; /* 初始隐藏 */
    flex-grow: 1;
}

.price-result.show {
    display: block; /* 计算后显示 */
}

/* 最终价格卡片 - 蓝色左侧边框 */
.final-price-card {
    background-color: white;
    padding: 1rem; /* 增加内边距 */
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.final-price-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.final-price-value {
    font-size: 1.75rem; /* 增大字体 */
    font-weight: 700;
    color: #2563eb;
}

/* 价格参数输入区域 */
.price-params {
    background-color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #f59e0b;
}

.price-params-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #fef3c7;
}

.price-params-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .price-params-group {
        grid-template-columns: 1fr;
    }
}

.price-param {
    margin-bottom: 0.5rem;
}

.price-param label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.price-param input {
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 1px solid #fbbf24;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.price-param input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.1);
}

.price-param-hint {
    font-size: 0.7rem;
    color: #b45309;
    margin-top: 0.125rem;
}

/* 不含税和货场价格卡片 */
.price-card {
    background-color: white;
    padding: 0.875rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.price-card.exc-tax {
    border-left: 4px solid #10b981;
}

/* 价格公式样式 */
.price-formula {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-style: italic;
}

.price-card.warehouse {
    border-left: 4px solid #8b5cf6;
}

.price-card.self-pickup {
    border-left: 4px solid #f59e0b;
}

.price-card-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.price-card-value {
    font-size: 1.125rem;
    font-weight: 700;
}

.price-card-value.exc-tax {
    color: #10b981;
}

.price-card-value.warehouse {
    color: #8b5cf6;
}

.price-card-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-style: italic;
}

/* 详细计算折叠区域 */
.detail-collapse {
    margin-bottom: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.detail-collapse-header {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s;
}

.detail-collapse-header:hover {
    background-color: #f1f5f9;
}

.detail-collapse-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.detail-collapse-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.detail-collapse-content.expanded {
    max-height: 1000px;
}

/* 详细计算过程容器 */
.calculation-details {
    padding: 1rem; /* 增加内边距 */
}

.calculation-details-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #f3f4f6;
}

/* 价格构成步骤 */
.calculation-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 增加间距 */
}

.calculation-step {
    background-color: #f8fafc;
    padding: 0.75rem; /* 增加内边距 */
    border-radius: 0.375rem;
}

.step-title {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.step-result {
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 500;
}

/* 总价格步骤 - 蓝色背景 */
.total-step {
    background-color: #dbeafe;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border-left: 3px solid #2563eb;
}

.total-step .step-result {
    font-weight: 700;
    color: #1d4ed8;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    max-height: 300px; /* 限制表格高度 */
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    font-size: 0.75rem;
}

th, td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border: 1px solid #e5e5e5;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
}

.highlight-row {
    background-color: #dcfce7;
    font-weight: 600;
}

/* 货场收货报价表模态框 */
.quotation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.quotation-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.quotation-modal-content {
    background-color: white;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.quotation-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quotation-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.quotation-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s;
}

.quotation-modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.quotation-modal-body {
    padding: 1.5rem;
}

.quotation-info {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border-left: 4px solid #3b82f6;
}

.quotation-info-row {
    display: flex;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.quotation-info-label {
    font-weight: 600;
    color: #374151;
    min-width: 120px;
}

.quotation-info-value {
    color: #6b7280;
}

.quotation-table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.quotation-table {
    width: 100%;
    border-collapse: collapse;
}

.quotation-table th {
    background-color: #3b82f6;
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 600;
    border: 1px solid #2563eb;
}

.quotation-table td {
    padding: 0.75rem 1rem;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.quotation-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
}

.quotation-table tbody tr:hover {
    background-color: #f1f5f9;
}

.material-type-header {
    background-color: #10b981 !important;
    border-color: #059669 !important;
}

.chips-header {
    background-color: #8b5cf6 !important;
    border-color: #7c3aed !important;
}

.self-pickup-header {
    background-color: #10b981 !important;
    border-color: #059669 !important;
}

.quotation-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.print-btn {
    background-color: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.print-btn:hover {
    background-color: #2563eb;
}

.close-modal-btn {
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 0.75rem 1.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.close-modal-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .nav-tabs {
        flex-direction: row; /* 保持行方向 */
    }
    
    .nav-tab {
        padding: 0.75rem 0.5rem; /* 在小屏幕上调整内边距 */
        font-size: 0.9rem; /* 稍微减小字体大小 */
    }
    
    .input-container {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 1rem;
    }
    
    .final-price-value {
        font-size: 1.5rem;
    }
    
    .quotation-btn-container {
        flex-direction: column;
    }
    
    .calculate-btn, .reset-btn {
        width: 100%;
    }
    
    .quotation-modal-content {
        max-height: 95vh;
    }
    
    .quotation-table th, 
    .quotation-table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* 计算器内容切换 */
.calculator-content {
    display: none;
}

.calculator-content.active {
    display: block;
}

/* 含钼刨花区域样式 */
.chips-formula-info {
    background-color: #f0fdf4;
    color: #166534;
}

.chips-formula-title {
    color: #166534;
}

.chips-info-icon {
    color: #16a34a;
}

.chips-calculate-btn {
    background-color: #16a34a;
}

.chips-calculate-btn:hover {
    background-color: #15803d;
}

.chips-reset-btn {
    background-color: #f3f4f6;
    color: #6b7280;
}

.chips-reset-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.chips-total-step {
    background-color: #dcfce7;
    border-left: 3px solid #16a34a;
}

.chips-total-step .step-result {
    color: #166534;
}

.chips-final-price-card {
    border-left: 4px solid #22c55e;
}

.chips-final-price-value {
    color: #16a34a;
}

/* 输入区域容器 */
.input-area {
    display: flex;
    flex-direction: column;
}

/* 结果区域容器 */
.result-area {
    display: flex;
    flex-direction: column;
}

/* 验证数据区域 - 初始隐藏 */
.validation-box {
    background-color: #fef3c7;
    padding: 0.875rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid #f59e0b;
    display: none; /* 初始隐藏 */
}

.validation-box.show {
    display: block; /* 有数据时显示 */
}

.validation-text {
    font-size: 0.875rem;
    color: #92400e;
    line-height: 1.4;
}

.validation-text strong {
    font-weight: 600;
}

/* Z值指示器 */
.z-indicator {
    font-weight: 600;
    color: #1e40af;
    font-size: 0.875rem;
}

/* 参数摘要样式 */
.param-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.param-summary div {
    font-size: 0.75rem;
    color: #64748b;
}

.param-summary span {
    font-weight: 600;
    color: #334155;
}

/* 空值提示样式 */
.empty-value {
    color: #9ca3af;
    font-style: italic;
}

/* 占位符样式 */
::placeholder {
    color: #9ca3af;
}

/* 含钼刨花详细结果折叠样式 */
.chips-detail-collapse .detail-collapse-header {
    background-color: #f0fdf4;
}

.chips-detail-collapse .detail-collapse-header:hover {
    background-color: #dcfce7;
}

.chips-detail-collapse .detail-collapse-title {
    color: #166534;
}

.chips-detail-collapse .detail-collapse-icon {
    color: #16a34a;
}

/* 配置管理模态框样式 */
.config-container {
    max-width: 800px;
}

.config-content {
    padding: 1.5rem;
}

.config-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.config-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.config-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-group {
    margin-bottom: 1rem;
}

.config-row {
    display: flex;
    gap: 1rem;
}

.config-group.half {
    flex: 1;
}

.config-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #475569;
    font-size: 0.875rem;
}

.config-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    color: #1f2937;
    background-color: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.config-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.config-group input::placeholder {
    color: #9ca3af;
}

.config-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

.config-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.config-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.config-btn .btn-icon {
    width: 1rem;
    height: 1rem;
}

.config-btn.save-btn {
    background-color: #3b82f6;
    color: white;
}

.config-btn.save-btn:hover {
    background-color: #2563eb;
}

.config-btn.reset-btn {
    background-color: #f3f4f6;
    color: #6b7280;
}

.config-btn.reset-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
}

/* 配置管理响应式 */
@media (max-width: 768px) {
    .config-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .config-content {
        padding: 1rem;
        max-height: calc(95vh - 70px);
    }
    
    .config-row {
        flex-direction: column;
        gap: 0;
    }
    
    .config-actions {
        flex-direction: column;
    }
    
    .config-btn {
        width: 100%;
        justify-content: center;
    }
}