/* ==================== 义乌小牛联盟 风格 UI 主题 ==================== */
:root {
    --view-theme: #e93323;
    --view-priceColor: #e93323;
    --view-fontColor: #282828;
    --view-minorColor: #e93323;
    --view-bgColor: #f5f5f5;
    --view-cardBg: #ffffff;
    --view-border: #eeeeee;
    --view-muted: #999999;
    --view-success: #16ac57;
    --view-warning: #ff8e3b;
    --header-bg: #1a8cff;
    --header-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--view-bgColor);
    color: var(--view-fontColor);
    min-height: 100vh;
    padding-bottom: 70px; /* 为底部导航留空间 */
}

/* ==================== 顶部导航栏 - 义乌小牛联盟 深色风格 ==================== */
.header {
    background: linear-gradient(180deg, #2b9cf0 0%, #4dc3d8 40%, #6de3c5 70%, #8ef4c7 100%);
    color: var(--header-text);
    padding: 15px 16px 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.header-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.header .logo {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
}

.header .logo span {
    color: var(--view-theme);
}

.header .search-bar-header {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,0.08);
}

.header .search-bar-header input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 0;
}

.header .search-bar-header input::placeholder {
    color: rgba(255,255,255,0.45);
}

.header .search-bar-header .search-icon {
    color: rgba(255,255,255,0.45);
    font-size: 15px;
    cursor: pointer;
}

.header .search-bar-header .category-filter-header {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    padding: 4px 10px;
    margin-right: 8px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
    min-width: 90px;
    max-width: 110px;
}

.header .search-bar-header .category-filter-header option {
    background: #fff;
    color: #333;
    font-size: 13px;
    padding: 6px 10px;
}

.header .search-bar-header:focus-within {
    border-color: rgba(233,51,35,0.4);
    background: rgba(255,255,255,0.16);
}

/* 导航标签 - 横向滚动 */
.nav-tabs {
    display: flex;
    overflow-x: auto;
    gap: 0;
    margin: 8px -4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.65);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-tab:hover,
.nav-tab.active {
    background: var(--view-theme);
    color: #fff;
    font-weight: 600;
}

/* 用户状态栏 */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.user-status {
    padding: 4px 12px;
    background: rgba(233,51,35,0.15);
    color: #ffb8b3;
    border-radius: 12px;
    font-size: 11px;
}

.user-status.user-disabled {
    background: rgba(233,51,35,0.25);
    color: #ffa099;
}

.sync-status {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    margin-left: auto;
}

.sync-status.connected {
    background: rgba(22,172,87,0.18);
    color: #7be09d;
}

.sync-status.error {
    background: rgba(233,51,35,0.18);
    color: #ff9088;
}

/* 数据操作按钮 */
.data-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.btn-export, .btn-import {
    padding: 5px 12px;
    border: none;
    border-radius: 14px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
}

.btn-export {
    background: rgba(233,51,35,0.85);
    color: white;
}

.btn-export:hover {
    background: var(--view-theme);
    transform: translateY(-1px);
}

.btn-import {
    background: rgba(255,142,59,0.85);
    color: white;
}

.btn-import:hover {
    background: var(--view-warning);
    transform: translateY(-1px);
}

/* ==================== 内容区域 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.tab-content {
    display: none;
    padding: 12px;
}

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

/* 卡片样式 */
.card {
    background: var(--view-cardBg);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    margin-bottom: 12px;
}

.card h2 {
    color: var(--view-fontColor);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card h2::before {
    content: '';
    width: 3px;
    height: 16px;
    background: var(--view-theme);
    border-radius: 2px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h2 {
    margin: 0;
}

/* ==================== 表单样式 ==================== */
.form {
    max-width: 900px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--view-fontColor);
    font-weight: 600;
    font-size: 13px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--view-border);
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.25s ease;
    background: #fafafa;
    color: var(--view-fontColor);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--view-theme);
    box-shadow: 0 0 0 3px rgba(233,51,35,0.08);
    background: #fff;
}

.input-with-button {
    display: flex;
    gap: 6px;
}

.input-with-button input,
.input-with-button select {
    flex: 1;
}

.btn-small {
    padding: 0 12px;
    background: var(--view-theme);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    min-width: 36px;
    transition: all 0.25s ease;
}

.btn-small:hover {
    background: #d42d1f;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 图片上传 */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    display: none;
}

.upload-placeholder {
    border: 2px dashed var(--view-border);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--view-muted);
    font-size: 13px;
    background: #fafafa;
}

.upload-placeholder:hover {
    border-color: var(--view-theme);
    background: rgba(233,51,35,0.02);
}

.upload-placeholder.has-image {
    padding: 14px;
}

.upload-placeholder img {
    max-width: 100%;
    max-height: 260px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* ==================== 按钮样式 - 义乌小牛联盟 红橙渐变风 ==================== */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 11px 28px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #f35749 0%, #e93323 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(233,51,35,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(233,51,35,0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: var(--view-fontColor);
    border: 1px solid var(--view-border);
}

.btn-secondary:hover {
    background: #eee;
}

.btn-success {
    background: linear-gradient(135deg, #1cb86a 0%, #16ac57 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(22,172,87,0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(22,172,87,0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e93323 0%, #cc1f10 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(233,51,35,0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(233,51,35,0.4);
}

.btn-add {
    padding: 10px 20px;
    background: linear-gradient(135deg, #f35749 0%, #e93323 100%);
    color: white;
    border-radius: 22px;
    font-weight: 600;
}

.btn-warning {
    background: linear-gradient(135deg, #ff8e3b 0%, #f57c00 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(255,142,59,0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(255,142,59,0.4);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(37,99,235,0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(37,99,235,0.4);
}

/* ==================== 搜索栏 ==================== */
.search-bar {
    margin-bottom: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    border: 1px solid var(--view-border);
    border-radius: 22px;
    font-size: 13px;
    background: #fafafa;
    transition: all 0.25s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--view-theme);
    box-shadow: 0 0 0 3px rgba(233,51,35,0.06);
    background: #fff;
}

.search-bar select {
    min-width: 130px;
    padding: 10px 12px;
    border: 1px solid var(--view-border);
    border-radius: 22px;
    font-size: 13px;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.25s;
}

.search-bar select:focus {
    outline: none;
    border-color: var(--view-theme);
}

/* ==================== 产品网格 ==================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.product-card {
    border: 1px solid var(--view-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--view-cardBg);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: rgba(233,51,35,0.2);
}

.product-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f5f7fa 0%, #eef2f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    max-width: 95%;
    max-height: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.product-image .placeholder {
    color: #ddd;
    font-size: 40px;
}

.product-info {
    padding: 12px;
}

.product-code {
    color: var(--view-theme);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-name {
    color: var(--view-fontColor);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-detail {
    color: var(--view-muted);
    font-size: 12px;
    margin-bottom: 3px;
}

.product-price {
    color: var(--view-priceColor);
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.product-price::before {
    content: '\00A5';
    font-size: 12px;
    font-weight: 600;
}

.product-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--view-border);
}

.product-actions .form-row {
    margin-bottom: 0;
}

.product-actions input {
    padding: 7px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-delete-product {
    width: 100%;
    padding: 7px;
    margin: 6px 0;
    background: #fff0ef;
    color: #e93323;
    border: 1px solid #ffd4d1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.25s;
    font-weight: 500;
}

.btn-delete-product:hover {
    background: #e93323;
    color: white;
    border-color: #e93323;
}

.btn-add-cart {
    width: 100%;
    padding: 9px;
    background: linear-gradient(135deg, #f35749 0%, #e93323 100%);
    color: white;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.25s;
    box-shadow: 0 3px 10px rgba(233,51,35,0.25);
}

.btn-add-cart:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* ==================== 报价单 ==================== */
.add-product-section {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.add-product-section select,
.add-product-section input {
    flex: 1;
    min-width: 130px;
    padding: 9px 12px;
    border: 1px solid var(--view-border);
    border-radius: 8px;
    font-size: 13px;
    background: #fafafa;
}

.quotation-items {
    margin-top: 18px;
    background: #fafafa;
    border-radius: 10px;
    padding: 14px;
    border: 1px solid var(--view-border);
}

.quotation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
    border: 1px solid var(--view-border);
    transition: all 0.2s;
}

.quotation-item:hover {
    border-color: rgba(233,51,35,0.2);
}

.quotation-item-info {
    flex: 1;
    min-width: 180px;
}

.quotation-item-qty,
.quotation-item-price,
.quotation-item-total {
    text-align: center;
    min-width: 80px;
    font-size: 13px;
}

.quotation-item-qty input,
.quotation-item-price input {
    width: 70px;
    text-align: center;
    padding: 7px;
    border-radius: 6px;
    border: 1px solid var(--view-border);
}

.quotation-item-remove {
    background: var(--view-theme);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.quotation-item-remove:hover {
    background: #cc1f10;
    transform: scale(1.05);
}

.quotation-summary {
    background: linear-gradient(180deg, #2b9cf0 0%, #4dc3d8 40%, #6de3c5 70%, #8ef4c7 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 18px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.summary-item.total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 16px;
    font-weight: 700;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--view-muted);
    font-size: 14px;
}

.empty-state::before {
    content: '\{ \}';
    display: block;
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.2;
}

/* ==================== 用户统计 ==================== */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
    background: #fafafa;
    border-radius: 10px;
    border: 1px solid var(--view-border);
}

.stat-item {
    background: white;
    padding: 12px 18px;
    border-radius: 8px;
    text-align: center;
    min-width: 90px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid var(--view-border);
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--view-muted);
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--view-theme);
}

.stat-value.pending {
    color: var(--view-warning);
}

/* 筛选器 */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-row select,
.filter-row input {
    padding: 9px 12px;
    border: 1px solid var(--view-border);
    border-radius: 8px;
    font-size: 13px;
    background: #fafafa;
}

.filter-row select {
    min-width: 110px;
}

.filter-row input {
    flex: 1;
    min-width: 180px;
}

/* 用户表格 */
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
    border: 1px solid var(--view-border);
    border-radius: 8px;
    overflow: hidden;
}

.users-table th,
.users-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--view-border);
}

.users-table th {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    font-weight: 600;
    color: var(--view-fontColor);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.users-table tr:last-child td {
    border-bottom: none;
}

.users-table tr:hover {
    background: rgba(233,51,35,0.02);
}

.type-select {
    padding: 5px 8px;
    border: 1px solid var(--view-border);
    border-radius: 6px;
    font-size: 12px;
}

/* 状态徽章 */
.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-pending {
    background: #fff7ed;
    color: #ea580c;
}

.status-approved {
    background: #f0fdf4;
    color: #16ac57;
}

.status-rejected {
    background: #fef2f2;
    color: #dc2626;
}

.status-active {
    background: #f0fdf4;
    color: #16ac57;
}

.status-warning {
    background: #fffbeb;
    color: #d97706;
}

.status-expired {
    background: #fef2f2;
    color: #dc2626;
}

/* ==================== 系统管理面板 ==================== */
.admin-section {
    background: white;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px solid var(--view-border);
}

.admin-section h3 {
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--view-theme);
    color: var(--view-fontColor);
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-section h3::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--view-theme);
    border-radius: 2px;
}

.admin-section .help-text {
    font-size: 12px;
    color: var(--view-muted);
    margin-top: 4px;
}

.admin-section .help-text.warning {
    color: #dc2626;
    font-weight: 500;
}

.admin-section .button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-section .form-group {
    margin-bottom: 12px;
}

.admin-section .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.admin-section .form-group select {
    width: 100%;
    max-width: 300px;
    padding: 9px 10px;
    border: 1px solid var(--view-border);
    border-radius: 8px;
    font-size: 13px;
    background: #fafafa;
}

/* ==================== 报价库样式 ==================== */
.library-actions {
    margin-top: 16px;
    padding: 12px 14px;
    background: #fafafa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid var(--view-border);
}

.library-actions .help-text {
    color: var(--view-muted);
    font-size: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 12px;
    border: 1px solid var(--view-border);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--view-border);
}

.data-table th {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    font-weight: 600;
    color: var(--view-fontColor);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: sticky;
    top: 0;
}

.data-table tr:hover {
    background: rgba(233,51,35,0.02);
}

#quotationLibraryContent {
    max-height: 550px;
    overflow-y: auto;
}

#quotationLibraryContent table {
    border: 1px solid var(--view-border);
    border-radius: 8px;
}

/* ==================== 模态框 ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 420px;
    width: 90%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #f35749 0%, #e93323 100%);
    color: white;
    padding: 18px 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    font-size: 22px;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}

.modal-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.25);
}

.modal-form {
    padding: 22px 20px;
}

.modal-form .form-group {
    margin-bottom: 14px;
}

.modal-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--view-fontColor);
    font-size: 13px;
}

.modal-form .form-group input,
.modal-form .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--view-border);
    border-radius: 8px;
    font-size: 13px;
    transition: border-color 0.25s;
    background: #fafafa;
}

.modal-form .form-group input:focus,
.modal-form .form-group select:focus {
    outline: none;
    border-color: var(--view-theme);
    box-shadow: 0 0 0 3px rgba(233,51,35,0.06);
}

.modal-form .form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.modal-form .form-actions .btn {
    width: 100%;
    border-radius: 22px;
    padding: 12px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .tab-content {
        padding: 8px;
    }

    .card {
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 8px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 13px;
    }

    .product-price {
        font-size: 16px;
    }

    .nav-tab {
        padding: 5px 12px;
        font-size: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .quotation-item {
        flex-direction: column;
        text-align: left;
    }

    .quotation-item-qty,
    .quotation-item-price,
    .quotation-item-total {
        text-align: left;
    }

    .stats-row {
        gap: 6px;
    }

    .stat-item {
        padding: 10px 12px;
        min-width: 70px;
    }

    .stat-value {
        font-size: 17px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-row select,
    .filter-row input {
        width: 100%;
        min-width: unset;
    }

    .add-product-section {
        flex-direction: column;
    }

    .add-product-section select,
    .add-product-section input {
        width: 100%;
    }

    .modal-content {
        width: 94%;
        border-radius: 14px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 16px;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* ==================== 义乌小牛联盟 风格底部导航栏 ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #fff;
    border-top: 1px solid var(--view-border);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 999;
    padding: 5px 0 env(safe-area-inset-bottom, 0);
    height: 60px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--view-muted);
    font-size: 10px;
    padding: 4px 12px;
    transition: all 0.25s ease;
    position: relative;
    cursor: pointer;
    min-width: 56px;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.nav-label {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.bottom-nav-item.active {
    color: var(--view-theme);
}

.bottom-nav-item.active .nav-icon {
    transform: scale(1.15);
}

.bottom-nav-item:hover .nav-icon {
    transform: scale(1.08);
}

/* 底部导航 - 桌面端隐藏，移动端显示 */
@media (min-width: 769px) {
    body {
        padding-bottom: 0 !important;
    }
    
    .bottom-nav {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex !important;
    }
}

/* ==================== 产品详情弹窗 ==================== */
/* ==================== 产品详情弹窗 ==================== */
.product-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}

.detail-modal-full {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    animation: slideUp 0.25s ease;
}

/* 顶部大图 */
.detail-image-top {
    width: 100%;
    height: 220px;
    background: #f5f6f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}
.detail-image-top img {
    max-width: 94%;
    max-height: 94%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}
.placeholder-lg {
    font-size: 56px;
    opacity: 0.25;
}

.detail-body {
    padding: 14px 18px 18px;
}

.detail-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px; height: 28px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    transition: background 0.15s;
}
.detail-close-btn:hover { background: rgba(233,51,35,0.85); }

.detail-title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    line-height: 1.35;
    margin-bottom: 2px;
    word-break: break-word;
}

.detail-code {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.detail-tag-uploader {
    display: inline-block;
    font-size: 11px;
    color: #e91e63;
    background: #fef2f1;
    padding: 2px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
}

/* 大价格 */
.detail-price-big {
    font-size: 22px;
    font-weight: 800;
    color: #e93323;
    margin: 6px 0 10px;
}

/* 规格信息网格 */
.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 8px;
}
.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 3px 0;
}
.spec-label {
    color: #999;
    flex-shrink: 0;
    margin-right: 8px;
}
.spec-val {
    color: #333;
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

/* 描述文字 */
.spec-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    padding: 8px 10px;
    background: #fdf8f5;
    border-left: 3px solid #e93323;
    border-radius: 0 8px 8px 0;
    margin-bottom: 10px;
}

.detail-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
}

.after-add-actions {
    gap: 8px !important;
}

.btn-add-cart-detail,
.btn-edit-detail,
.btn-delete-detail,
.btn-continue-select,
.btn-finish-select {
    padding: 10px 0;
    border: none;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.btn-add-cart-detail {
    flex: 1.5;
    background: linear-gradient(135deg, #f35749, #e93323);
    color: #fff;
}
.btn-add-cart-detail:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(233,51,35,0.35); }

.btn-edit-detail {
    background: #f5f5f5;
    color: #555;
    min-width: 64px;
}
.btn-edit-detail:hover { background: #ebebeb; }

.btn-delete-detail {
    background: #fff;
    color: #e93323;
    border: 1px solid #fdd8d4 !important;
    min-width: 60px;
}
.btn-delete-detail:hover { background: #fef2f1; }

.btn-continue-select {
    flex: 1;
    background: linear-gradient(135deg, #3399ff, #1a6dd4);
    color: #fff;
}
.btn-continue-select:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(51,153,255,0.3); }

.btn-finish-select {
    flex: 1;
    background: linear-gradient(135deg, #2d8a3e, #1a6b28);
    color: #fff;
}
.btn-finish-select:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(45,138,62,0.3); }

.btn-add-cart-detail,
.btn-edit-detail,
.btn-delete-detail {
    flex: 1;
    padding: 11px 0;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-add-cart-detail {
    background: linear-gradient(135deg, #f35749, #e93323);
    color: #fff;
}
.btn-add-cart-detail:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(233,51,35,0.35); }
.btn-add-cart-detail:active { transform: translateY(0); }

.btn-edit-detail {
    background: #f5f5f5;
    color: #333;
}
.btn-edit-detail:hover { background: #ebebeb; }

.btn-delete-detail {
    background: #fff;
    color: #e93323;
    border: 1px solid #fdd8d4 !important;
}
.btn-delete-detail:hover { background: #fef2f1; }

/* 首页产品卡片 - 简洁模式 */
#product-list .product-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
#product-list .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
#product-list .product-card:active {
    transform: scale(0.98);
}

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

/* 报价单 - 二级联动产品选择器 */
.product-select-category {
    min-width: 110px;
    max-width: 140px;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    border: 1.5px solid #e0e0e0;
    background: #fafafa;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    flex-shrink: 0;
}
.product-select-category:focus {
    border-color: #3399ff;
    background: #fff;
}

#productSelect {
    flex: 1;
    min-width: 160px;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    border: 1.5px solid #e0e0e0;
    background: #fafafa;
    color: #333;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
#productSelect:focus {
    border-color: #e93323;
    background: #fff;
}

/* ==================== 分类/品牌管理面板样式 ==================== */
.input-with-button-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.input-with-button-group select { flex: 1; }
.btn-manage-option {
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 14px;
    background: #f0f4ff;
    color: #3399ff;
}

.mgr-overlay {
    position: fixed; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.45);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.2s ease;
}
.mgr-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    animation: slideUp 0.25s ease;
    overflow: hidden;
}
.mgr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #3399ff, #1a6dd4);
}
.mgr-header h3 {
    color: #fff; margin:0; font-size: 17px; font-weight: 700;
}
.mgr-close {
    background: rgba(255,255,255,0.25); color:#fff; border:none;
    border-radius:50%; width:28px;height:28px;font-size:18px;cursor:pointer;line-height:1;
}
.mgr-close:hover { background: rgba(233,51,35,0.85); }
.mgr-body {
    padding: 12px 16px;
    max-height: 320px;
    overflow-y: auto;
}
.mgr-empty {
    text-align:center; color:#999; padding:30px 0; font-size:14px;
}
.mgr-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
    border-radius: 8px;
    transition: background 0.15s;
    margin-bottom: 2px;
}
.mgr-item:hover { background: #f9fbff; }
.mgr-name {
    font-size: 14px; color: #333; font-weight: 500;
}
.mgr-actions { display:flex; gap:4px; }
.btn-mgr-edit, .btn-mgr-delete {
    width: 30px; height: 30px; border:none; border-radius:6px;
    font-size:13px; cursor:pointer; display:inline-flex;align-items:center;justify-content:center;
    transition: transform 0.15s;
}
.btn-mgr-edit:hover { transform: scale(1.1); background: #eef4ff; }
.btn-mgr-delete:hover { transform: scale(1.1); background: #fef2f1; }
.mgr-footer {
    display: flex; gap:8px; padding:14px 16px; border-top:1px solid #eee;
}
.mgr-footer input {
    flex:1; border:1.5px solid #ddd; border-radius:10px; padding:10px 14px;
    font-size:13px; outline:none; transition:border-color 0.2s;
}
.mgr-footer input:focus { border-color: #3399ff; }
.btn-mgr-add {
    padding: 0 18px; border:none; border-radius:10px;
    background: linear-gradient(135deg, #3399ff, #1a6dd4); color:#fff;
    font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap;
    transition: transform 0.15s;
}
.btn-mgr-add:hover { transform: translateY(-1px); }

/* Toast 轻提示 */
.toast-msg {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: linear-gradient(135deg, #2d8a3e, #1a6b28);
    color: #fff;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(26,107,40,0.35);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}
.toast-msg.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
