@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .vendor-tiles-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .vendor-table-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .vendor-page-header {
        padding: 20px;
    }
    
    .vendor-page-header h1 {
        font-size: 24px;
    }
    
    .vendor-tile {
        padding: 20px;
    }
    
    .vendor-tile .value {
        font-size: 32px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.file-item {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}
.file-item:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
}
.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 12px;
}
.text-file { background-color: #e3f2fd; color: #1565c0; }
.image-file { background-color: #f3e5f5; color: #7b1fa2; }
.document-file { background-color: #e8f5e8; color: #2e7d32; }
.archive-file { background-color: #fff3e0; color: #ef6c00; }
.code-file { background-color: #fbe9e7; color: #d84315; }
.default-file { background-color: #f5f5f5; color: #616161; }

.upload-section {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}
.upload-section.dragover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}
.file-path-readonly {
    background-color: #e9ecef;
    cursor: not-allowed;
}
.btn-custom {
    margin: 0 5px;
}
.status-message {
    min-height: 24px;
    font-size: 0.875rem;
}


/* 顶部导航栏 */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-size: 24px;
    color: #667eea;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #555;
}

.logout-btn {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.logout-btn:hover {
    color: #667eea;
}

.avatar {
    width: 40px;
    height: 40px;
    overflow: hidden; /* 关键属性：确保图片的角落也被正确裁剪为圆形 */
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 关键属性：控制图片的适应方式 */
}

/* 主容器 */
.main-container {
    display: flex;
    flex: 1;
    width: 100%;
}

/* 左侧边栏 */
.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
}

.menu-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.menu-item:hover, .menu-item.active {
    background: #f8f9ff;
    color: #667eea;
    border-left: 3px solid #667eea;
}

.menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 30px;
    width: 100%;
    height: calc(100vh - 70px);
    background: #f5f7fa;
}

#contentArea {
    width: 100%;
    height: 100%;
}

.loading-container, .error-container {
    text-align: center;
    padding: 50px 20px;
    color: #666;
}

/*.message-global {
    animation: slideInRight 0.3s ease;
}*/

.message-global {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050; /* 确保提示框位于其他内容之上 */
    min-width: 300px; /* 可自定义宽度 */
    animation: slideInRight 0.3s ease;
  }


  .alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.42857143;
  }
  
  /* Alert标题样式 */
  .alert h4 {
    margin-top: 0;
    color: inherit;
  }
  
  /* Alert链接样式 */
  .alert .alert-link {
    font-weight: bold;
    text-decoration: underline;
  }
  
  /* Alert段落和列表样式 */
  .alert > p,
  .alert > ul {
    margin-bottom: 0;
  }
  
  .alert > p + p {
    margin-top: 5px;
  }


/* 信息类型Alert样式 */
.alert-info {
    color: #31708f;                    /* 深蓝色文字 */
    background-color: #d9edf7;         /* 浅蓝色背景 */
    border-color: #bce8f1;             /* 蓝色边框 */
  }
  
  /* 信息Alert中的水平分割线 */
  .alert-info hr {
    border-top-color: #a6e1ec;         /* 更深的蓝色分割线 */
  }
  
  /* 信息Alert中的链接颜色 */
  .alert-info .alert-link {
    color: #245269;                    /* 深蓝色链接 */
  }

  
/* 错误类型Alert样式 */
.alert-error {
    color: #ffffff;                    /* 深蓝色文字 */
    background-color: #ff708f;         /* 浅蓝色背景 */
    border-color: #fd0303;             /* 蓝色边框 */
  }
  
  /* 信息Alert中的水平分割线 */
  .alert-error hr {
    border-top-color: #f85860;         /* 更深的蓝色分割线 */
  }
  
  /* 信息Alert中的链接颜色 */
  .alert-error .alert-link {
    color: #f8cb05;                    /* 深蓝色链接 */
  }


  /* 可关闭Alert容器样式 */
.alert-dismissible {
    padding-right: 35px;               /* 为关闭按钮预留空间 */
    position: relative;
  }
  
  /* 关闭按钮样式 */
  .alert-dismissible .close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);       /* 垂直居中 */
    color: inherit;                    /* 继承Alert的文字颜色 */
    opacity: 0.6;
    font-size: 21px;
    font-weight: bold;
    line-height: 1;
    background: transparent;
    border: 0;
    cursor: pointer;
  }

  /* 成功Alert */
.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
  }
  
  .alert-success .alert-link {
    color: #2b542c;
  }
  
  /* 警告Alert */
  .alert-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
  }
  
  .alert-warning .alert-link {
    color: #66512c;
  }
  
  /* 危险Alert */
  .alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
  }
  
  .alert-danger .alert-link {
    color: #843534;
  }
  
  /* 关闭按钮悬停效果 */
  .alert-dismissible .close:hover {
    opacity: 1;
  }
  
  /* 关闭按钮的X符号 */
  .alert-dismissible .close::before {
    content: "×";                      /* 使用×符号作为关闭图标 */
  }


  /* 淡入淡出动画 */
.alert.fade {
    opacity: 0;
    transition: opacity 0.15s linear;
  }
  
  .alert.fade.show {
    opacity: 1;
  }
  
  /* 显示状态 */
  .alert.show {
    display: block !important;
  }

  
.login-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-forgot label {
    display: flex;
    align-items: center;
    color: #555;
}

.remember-forgot input {
    margin-right: 5px;
}

.remember-forgot a {
    color: #667eea;
    text-decoration: none;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #5a6fd8;
}

.search_btn {
    width:30px;
    height:30px;
    background:#bfc0c3;
    color: black;
    border:none;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
    vertical-align: middle;
}

.search_btn:hover {
    background:#2c3e50;
    color: #ffffff;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #555;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}


        /* ==================== 供应商管理专用样式 - 恢复原始磁贴风格 ==================== */
        .vendor-content {
            width: 100%;
            padding: 0;
            background: #f5f7fa;
            min-height: calc(100vh-70px);
        }
        
        .vendor-page-header {
            background: white;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 25px;
        }
        
        .vendor-page-header h1 {
            color: #333;
            margin-bottom: 10px;
            font-size: 28px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .vendor-page-header h1 i {
            color: #667eea;
        }
        
        .vendor-page-header p {
            color: #666;
            font-size: 16px;
            margin: 0;
            line-height: 1.5;
        }
        
        /* ==================== 磁贴容器 - 根据图片恢复原始风格 ==================== */
        .vendor-tiles-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
            width: 100%;
        }
        
        .vendor-tile {
            background: white;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.1);
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
            border: none;
            width: 100%;
            position: relative;
            overflow: hidden;
        }
        
        .vendor-tile:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }
        
        .vendor-tile::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(135deg, #667eea, #764ba2);
        }
        
        .vendor-tile i {
            font-size: 42px;
            color: #667eea;
            margin-bottom: 15px;
            display: block;
        }
        
        .vendor-tile .value {
            font-size: 36px;
            font-weight: bold;
            color: #333;
            margin-bottom: 8px;
            line-height: 1;
        }
        
        .vendor-tile h3 {
            font-size: 16px;
            color: #666;
            margin-bottom: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .vendor-tile .description {
            color: #888;
            font-size: 13px;
            line-height: 1.4;
        }
        
        /* ==================== 供应商列表样式 ==================== */
        .vendor-table-section {
            background: white;
            border-radius: 10px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.1);
            overflow: hidden;
            width: 100%;
        }
        
        .vendor-table-header {
            padding: 20px 25px;
            border-bottom: 1px solid #eee;
            display: flex;
            /*justify-content: space-between;*/
            align-items: center;
            background: #f8f9fa;
        }
        
        .vendor-table-header h2 {
            color: #333;
            margin: 0;
            font-size: 20px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .vendor-add-btn {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
            margin-left: auto; /* 关键代码：将这个按钮及其后面的元素推到最右边 */
        }
        .vendor-add-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
            color: white;
        }
        
        .vendor-exp-btn {
            background: linear-gradient(135deg, #41ddbb, #6089e2);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
            margin-left: 10px; /* 关键代码：将这个按钮及其后面的元素推到最右边 */
        }
        .vendor-exp-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
            color: white;
        }
        
        .vendor-table-container {
            width: 100%;
            overflow-x: auto;
        }
        
        .vendor-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 1000px;
        }
        
        .vendor-table th {
            background: #f8f9fa;
            padding: 15px 20px;
            text-align: left;
            font-weight: 600;
            color: #555;
            border-bottom: 2px solid #e9ecef;
            font-size: 14px;
            white-space: nowrap;
        }
        
        .vendor-table td {
            padding: 15px 20px;
            border-bottom: 1px solid #f0f0f0;
            color: #2c3e50;
            vertical-align: middle;
        }
        
        .vendor-table tbody tr:hover {
            background: #f8f9ff;
        }
        
        .vendor-action-buttons {
            display: flex;
            gap: 6px;
        }
        
        .vendor-action-btn {
            padding: 6px 10px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
        }
        
        .vendor-btn-view {
            background: #3498db;
            color: white;
        }
        
        .vendor-btn-edit {
            background: #f39c12;
            color: white;
        }
        
        .vendor-btn-delete {
            background: #e74c3c;
            color: white;
        }
        
        .vendor-action-btn:hover {
            transform: translateY(-1px);
            opacity: 0.9;
        }

        .project-btn-view {
            background: #3498db;
            color: white;
        }
        
        .project-btn-edit {
            background: #f39c12;
            color: white;
        }
        
        .project-btn-quote {
            background: #e74c3c;
            color: white;
        }
        
        .project-action-btn:hover {
            transform: translateY(-1px);
            opacity: 0.9;
        }


        /* ==================== 表单样式 ==================== */
        .vendor-form-container {
            background: white;
            border-radius: 10px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.1);
            margin-bottom: 30px;
            overflow: hidden;
        }
        
        .vendor-form-header {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 20px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .vendor-form-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        

        /* ==================================联系人样式=================================*/
        /* ==================== 供应商管理专用样式 - 恢复原始磁贴风格 ==================== */
        .contact-content {
            width: 100%;
            padding: 0;
            background: #f5f7fa;
            min-height: calc(100vh-70px);
        }
        
        .contact-page-header {
            background: white;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 25px;
        }
        
        .contact-page-header h1 {
            color: #333;
            margin-bottom: 10px;
            font-size: 28px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .contact-page-header h1 i {
            color: #667eea;
        }
        
        .contact-page-header p {
            color: #666;
            font-size: 16px;
            margin: 0;
            line-height: 1.5;
        }
        
        /* ==================== 磁贴容器 - 根据图片恢复原始风格 ==================== */
        .contact-tiles-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
            width: 100%;
        }
        
        .contact-tile {
            background: white;
            padding: 25px;
            border-radius: 12px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.1);
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
            border: none;
            width: 100%;
            position: relative;
            overflow: hidden;
        }
        
        .contact-tile:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }
        
        .contact-tile::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(135deg, #667eea, #764ba2);
        }
        
        .contact-tile i {
            font-size: 42px;
            color: #667eea;
            margin-bottom: 15px;
            display: block;
        }
        
        .contact-tile .value {
            font-size: 36px;
            font-weight: bold;
            color: #333;
            margin-bottom: 8px;
            line-height: 1;
        }
        
        .contact-tile h3 {
            font-size: 16px;
            color: #666;
            margin-bottom: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .contact-tile .description {
            color: #888;
            font-size: 13px;
            line-height: 1.4;
        }
        
        /* ==================== 供应商列表样式 ==================== */
        .contact-table-section {
            background: white;
            border-radius: 10px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.1);
            overflow: hidden;
            width: 100%;
        }
        
        .contact-table-header {
            padding: 20px 25px;
            border-bottom: 1px solid #eee;
            display: flex;
            /*justify-content: space-between;*/
            align-items: center;
            background: #f8f9fa;
        }
        
        .contact-table-header h2 {
            color: #333;
            margin: 0;
            font-size: 20px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .contact-add-btn {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
            margin-left: auto; /* 关键代码：将这个按钮及其后面的元素推到最右边 */
        }
        .contact-add-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
            color: white;
        }
        
        .contact-exp-btn {
            background: linear-gradient(135deg, #41ddbb, #6089e2);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-weight: 500;
            margin-left: 10px; /* 关键代码：将这个按钮及其后面的元素推到最右边 */
        }
        .contact-exp-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
            color: white;
        }
        
        .contact-table-container {
            width: 100%;
            overflow-x: auto;
        }
        
        .contact-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 1000px;
        }
        
        .contact-table th {
            background: #f8f9fa;
            padding: 15px 20px;
            text-align: left;
            font-weight: 600;
            color: #555;
            border-bottom: 2px solid #e9ecef;
            font-size: 14px;
            white-space: nowrap;
        }
        
        .contact-table td {
            padding: 15px 20px;
            border-bottom: 1px solid #f0f0f0;
            color: #2c3e50;
            vertical-align: middle;
        }
        
        .contact-table tbody tr:hover {
            background: #f8f9ff;
        }
        
        .contact-action-buttons {
            display: flex;
            gap: 6px;
        }
        
        .contact-action-btn {
            padding: 6px 10px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
        }
        
        .contact-btn-view {
            background: #3498db;
            color: white;
        }
        
        .contact-btn-edit {
            background: #f39c12;
            color: white;
        }
        
        .contact-btn-delete {
            background: #e74c3c;
            color: white;
        }
        
        .contact-action-btn:hover {
            transform: translateY(-1px);
            opacity: 0.9;
        }
        
        /* ==================== 表单样式 ==================== */
        .contact-form-container {
            background: white;
            border-radius: 10px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.1);
            margin-bottom: 30px;
            overflow: hidden;
        }
        
        .contact-form-header {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: white;
            padding: 20px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .contact-form-header h3 {
            margin: 0;
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
        }




        .btn-close-form {
            background: none;
            border: none;
            color: white;
            font-size: 18px;
            cursor: pointer;
            padding: 5px;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s;
        }
        
        .btn-close-form:hover {
            background: rgba(255,255,255,0.2);
        }
        
        .vendor-form {
            padding: 25px;
        }

        .product-form {
            padding: 25px;
        }
        
        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            font-weight: 500;
            color: #555;
            margin-bottom: 8px;
            display: block;
        }
        
        .form-control {
            width: 100%;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 6px;
            font-size: 14px;
            transition: all 0.3s;
        }
        
        .form-control:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
        }
        
        .form-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
        }
        
        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 500;
        }
        

        
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        }
        
        .invalid-feedback {
            color: #dc3545;
            font-size: 12px;
            margin-top: 5px;
        }
        
        /* ==================== 消息提示 ==================== */
        .vendor-message {
            padding: 15px 20px;
            margin-bottom: 20px;
            border-radius: 5px;
            font-weight: 500;
        }
        
        .vendor-message.success {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .vendor-message.error {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        


               /* 聊天界面样式 - 与图片完全一致 */
               .chat-container {
                display: flex;
                height: calc(100vh - 130px);
                background: white;
                border-radius: 10px;
                box-shadow: 0 2px 10px rgba(0,0,0,0.1);
                overflow: hidden;
            }
            
            .contact-list {
                width: 300px;
                border-right: 1px solid #eee;
                display: flex;
                flex-direction: column;
            }
            
            .contact-list-header {
                padding: 20px;
                border-bottom: 1px solid #eee;
                background: #f8f9fa;
            }
            
            .contact-list-header h2 {
                color: #333;
                margin: 0;
                font-size: 18px;
                display: flex;
                align-items: center;
                gap: 10px;
            }
            
            .contacts-container {
                flex: 1;
                overflow-y: auto;
            }
            
            .contact-item {
                padding: 15px 20px;
                border-bottom: 1px solid #f5f5f5;
                cursor: pointer;
                display: flex;
                align-items: center;
                transition: all 0.3s;
            }
            
            .contact-item:hover, .contact-item.active {
                background: #f8f9fa;
            }
            
            .contact-avatar {
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: linear-gradient(135deg, #667eea, #764ba2);
                color: white;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: bold;
                margin-right: 12px;
            }
            
            .contact-info {
                flex: 1;
            }
            
            .contact-name {
                font-weight: 600;
                color: #333;
                margin-bottom: 4px;
            }
            
            .contact-status {
                font-size: 12px;
                color: #666;
                display: flex;
                align-items: center;
            }
            
            .status-dot {
                width: 8px;
                height: 8px;
                border-radius: 50%;
                margin-right: 6px;
            }
            
            .status-online {
                background: #52c41a;
            }
            
            .status-offline {
                background: #d9d9d9;
            }
            
            .no-contacts-message {
                text-align: center;
                padding: 40px 20px;
                color: #999;
            }
            
            .no-contacts-message i {
                font-size: 48px;
                margin-bottom: 15px;
                opacity: 0.5;
                display: block;
            }
            
            .chat-area {
                flex: 1;
                display: flex;
                flex-direction: column;
            }
            
            .chat-placeholder {
                display: flex;
                align-items: center;
                justify-content: center;
                height: 100%;
                color: #999;
                text-align: center;
            }
            
            .chat-placeholder i {
                font-size: 64px;
                margin-bottom: 20px;
                opacity: 0.3;
                display: block;
            }
            
            .chat-placeholder h3 {
                font-size: 18px;
                margin-bottom: 10px;
                color: #666;
            }
            
            .chat-placeholder p {
                font-size: 14px;
                color: #999;
            }


            .product-container {
                width: 100%;
                background: #f5f7fa;
                min-height: calc(100vh - 130px);
            }
            
            .product-header {
                background: white;
                padding: 25px;
                border-radius: 10px;
                box-shadow: 0 2px 10px rgba(0,0,0,0.1);
                margin-bottom: 25px;
            }
            
            .product-header h1 {
                color: #333;
                margin-bottom: 10px;
                font-size: 28px;
                display: flex;
                align-items: center;
                gap: 12px;
            }
            
            .product-header h1 i {
                color: #667eea;
            }
            
            .product-header p {
                color: #666;
                font-size: 16px;
                margin: 0;
            }
            
            .stats-grid {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
                gap: 20px;
                margin-bottom: 30px;
            }
            
            /* 正式使用的风格 */
            .stat-card {
                background: white;
                padding: 25px;
                border-radius: 12px;
                box-shadow: 0 3px 15px rgba(0,0,0,0.1);
                text-align: center;
                transition: all 0.3s ease;
                cursor: pointer;
                border: none;
                width: 100%;
                position: relative;
                overflow: hidden;
            }
            
            .stat-card:hover {
                transform: translateY(-5px);
                box-shadow: 0 8px 25px rgba(0,0,0,0.15);
            }
            
            .stat-card::before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 4px;
                background: linear-gradient(135deg, #667eea, #764ba2);
            }
            
            .stat-card i {
                font-size: 42px;
                color: #667eea;
                margin-bottom: 15px;
                display: block;
            }
            
            .stat-card .value {
                font-size: 36px;
                font-weight: bold;
                color: #333;
                margin-bottom: 8px;
                line-height: 1;
            }
            
            .stat-card h3 {
                font-size: 16px;
                color: #666;
                margin-bottom: 10px;
                font-weight: 600;
                text-transform: uppercase;
                letter-spacing: 0.5px;
            }
            
            .stat-card .description {
                color: #888;
                font-size: 13px;
                line-height: 1.4;
            }
            
            .stat-value {
                font-size: 36px;
                font-weight: bold;
                color: #333;
                margin-bottom: 8px;
            }

            
            .stat-title {
                font-size: 16px;
                color: #666;
                margin-bottom: 10px;
                font-weight: 600;
            }
            
            .product-table-section {
                background: white;
                border-radius: 10px;
                box-shadow: 0 3px 15px rgba(0,0,0,0.1);
                overflow: hidden;
            }
            
            .product-table-header {
                padding: 20px 25px;
                border-bottom: 1px solid #eee;
                display: flex;
                justify-content: space-between;
                align-items: center;
                background: #f8f9fa;
            }
            
            .product-table-header h2 {
                color: #333;
                margin: 0;
                font-size: 20px;
                display: flex;
                align-items: center;
                gap: 10px;
            }
            
            .btn-add-product {
                background: linear-gradient(135deg, #667eea, #764ba2);
                color: white;
                border: none;
                padding: 10px 20px;
                border-radius: 6px;
                cursor: pointer;
                display: inline-flex;
                align-items: center;
                gap: 8px;
                font-weight: 500;
            }

            .product-action-btn {
                padding: 6px 10px;
                border: none;
                border-radius: 4px;
                cursor: pointer;
                font-size: 12px;
                transition: all 0.3s;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 32px;
                height: 32px;
            }
            
            .product-btn-view {
                background: #3498db;
                color: white;
            }
            
            .product-btn-edit {
                background: #f39c12;
                color: white;
            }
            
            .product-btn-copy {
                background: #59c9a4;
                color: white;
            }

            .product-btn-delete {
                background: #e74c3c;
                color: white;
            }
            
            .product-action-btn:hover {
                transform: translateY(-1px);
                opacity: 0.9;
            }
    
            
            .product-table {
                width: 100%;
                border-collapse: collapse;
            }
            
            .product-table th {
                background: #f8f9fa;
                padding: 15px 12px;
                text-align: left;
                font-weight: 600;
                color: #555;
                border-bottom: 2px solid #e9ecef;
                white-space: nowrap;
            }
            
            .product-table td {
                padding: 12px;
                border-bottom: 1px solid #f0f0f0;
                vertical-align: middle;
            }
            
            .product-table tbody tr:hover {
                background: #f8f9ff;
            }

            .quotation_table {
                width: 100%;
                border-collapse: collapse;
            }

            .quotation_table th {
                background: #f8f9fa;
                text-align: left;
                font-weight: 600;
                color: #555;
                border-bottom: 2px solid #e9ecef;
                white-space: nowrap;
                padding: 10px 5px;
            }

            .quotation_table td{
                padding: 5px 5px;
                border-bottom: 1px solid #f0f0f0;
                vertical-align: top;
            }

            .quotation_table tbody tr:hover {
                background: #f8f9ff;
            }
            
            .status-badge {
                padding: 4px 8px;
                border-radius: 4px;
                font-size: 12px;
                font-weight: 500;
            }
            
            .status-purchased {
                background: #d4edda;
                color: #155724;
            }
            
            .status-not-purchased {
                background: #fff3cd;
                color: #856404;
            }
            .product-form-container {
                background: white;
                border-radius: 10px;
                box-shadow: 0 3px 15px rgba(0,0,0,0.1);
                margin-bottom: 30px;
                overflow: hidden;
            }
            
            .product-form-header {
                background: linear-gradient(135deg, #667eea, #764ba2);
                color: white;
                padding: 20px 25px;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
            
            .product-form-header h3 {
                color: #ffffff;
                margin: 0;
                display: flex;
                align-items: center;
                gap: 10px;
            }
            
            .form-row {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 20px;
                margin-bottom: 20px;
            }
            
            .form-group {
                margin-bottom: 0;
            }
            
            .form-label {
                display: block;
                margin-bottom: 8px;
                font-weight: 500;
                color: #555;
            }
            
            .form-control {
                width: 100%;
                padding: 10px 15px;
                border: 1px solid #ddd;
                border-radius: 6px;
                font-size: 14px;
            }
            
            .form-control:focus {
                border-color: #667eea;
                outline: none;
                box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
            }
            
            .form-actions {
                text-align: right;
                margin-top: 25px;
                padding-top: 20px;
                border-top: 1px solid #eee;
            }
            
            .btn {
                padding: 10px 25px;
                border: none;
                border-radius: 6px;
                cursor: pointer;
                font-size: 14px;
                font-weight: 500;
                transition: all 0.3s;
            }
            
            .btn-primary {
                background: linear-gradient(135deg, #667eea, #764ba2);
                color: white;
            }
            
            .btn-primary:hover {
                transform: translateY(-2px);
                box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
            }
            
            .btn-secondary {
                background: #6c757d;
                color: white;
                margin-right: 10px;
            }

            .btn-primary-top {
                background: linear-gradient(135deg, #667eea, #552bde);
                color: white;
            }
    
            .btn-secondary-top {
                background: #a6adb3;
                color: white;
                margin-right: 10px;
            }

            .btn-secondary-top:hover {
                transform: translateY(-2px);
                background: #a81313;
                color: white;
            }
            
            textarea.form-control {
                resize: vertical;
                min-height: 80px;
            }
            
            select.form-control {
                appearance: menulist;
            }

            /* 分页样式 */
        .vendor-pagination {
            margin: 30px 0;

        }

        .pagination {
            display: flex; /* 使用Flexbox布局 */
            padding-left: 0;
            list-style: none;
            border-radius: 0.25rem;
        }

        .page-link {
            color: #667eea;
            border: 1px solid #dee2e6;
            padding: 0.5rem 0.75rem;
        }

        .page-item {
            display: inline; /* 确保列表项横向显示 */
            cursor: pointer;
        }
        .page-link {
            position: relative;
            display: block; /* 或 inline-block */
            padding: 0.5rem 0.75rem;
            margin-left: -1px;
            line-height: 1.25;
            color: #007bff;
            background-color: #fff;
            border: 1px solid #dee2e6;
            text-decoration: none;
        }

        .page-item.active .page-link {
            background-color: #667eea;
            border-color: #667eea;
            color: #ffffff;
        }

        .page-link:hover {
            color: #764ba2;
            background-color: #f8f9fa;
            border-color: #dee2e6;
        }

        .page-item.disabled .page-link {
            color: #92989e;
            background-color: #fff;
            border-color: #dee2e6;
        }

        ul.pagination {
            display: flex !important;
          }

        /* 响应式调整 */
        @media (max-width: 768px) {
            .pagination {
                flex-wrap: wrap;
            }
            
            .page-item {
                margin-bottom: 0.5rem;
            }
            
            .vendor-pagination {
                margin: 20px 0;
            }
        }



        .pasteArea {
            width: 100%;
            height: 250px;
            border: 1px dashed rgb(179, 179, 179);
            text-align: center;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            color: #999;
            background: white;
            position: relative;
            margin-bottom: 20px;
            overflow: hidden; /* 防止图片超出边界 */
        }
        
        .pasteArea.has-image {
            border-color: #4CAF50;
            padding: 10px;
        }
        
        .pasteArea img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        
        .upload-status {
            margin-top: 10px;
            font-size: 14px;
            position: absolute;
            bottom: 10px;
            left: 0;
            right: 0;
        }
        
        .default-image {
            opacity: 0.6; /* 默认图片半透明显示 */
            transition: opacity 0.3s;
            max-width: 100%;
            max-height: 100%;
            width: auto;
            height: auto;
            object-fit: contain;
        }
        
        .user-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: white;
        }

        /* 触发器的基本样式 */
        .hover-trigger {
            display: inline-block; /* 确保元素有尺寸用于定位 */
            cursor: pointer;
            border: 1px solid transparent;
            font-size: 18px;
        }

        /* 共享的悬浮提示框样式 - 初始隐藏 */
        #imageTooltip {
            display: none; /* 默认隐藏 */
            position: fixed; /* 使用 fixed 定位，使其相对于视口定位 */
            z-index: 1000; /* 确保提示框在最上层 */
            background: white;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            padding: 8px;
            max-width: 300px; /* 控制提示框最大宽度 */
            /* 初始位置，会被 JavaScript 覆盖 */
            top: 0;
            left: 0;
        }

        /* 提示框内的图片样式 */
        #imageTooltip img {
            max-width: 100%; /* 图片宽度最大为提示框宽度 */
            height: auto; /* 高度自动，保持比例 */
            display: block;
        }

        .dashboard-container {
            width: 100%;
            padding: 0;
        }
        
        .dashboard-header {
            background: white;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 25px;
        }
        
        .dashboard-header h1 {
            color: #333;
            margin-bottom: 10px;
            font-size: 28px;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .dashboard-header h1 i {
            color: #667eea;
        }
        
        .dashboard-header p {
            color: #666;
            font-size: 16px;
            margin: 0;
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        
        .stat-card {
                        background: white;
                        padding: 25px;
                        border-radius: 12px;
                        box-shadow: 0 3px 15px rgba(0,0,0,0.1);
                        text-align: center;
                        transition: all 0.3s ease;
                        cursor: pointer;
                        border: none;
                        width: 100%;
                        position: relative;
                        overflow: hidden;
                    }
                    
        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }
        
        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(135deg, #667eea, #764ba2);
        }
        
        .stat-card i {
            font-size: 42px;
            color: #667eea;
            margin-bottom: 15px;
            display: block;
        }
        
        .stat-card .value {
            font-size: 36px;
            font-weight: bold;
            color: #333;
            margin-bottom: 8px;
            line-height: 1;
        }
        
        .stat-card h3 {
            font-size: 16px;
            color: #666;
            margin-bottom: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .stat-card .description {
            color: #888;
            font-size: 13px;
            line-height: 1.4;
        }
        
        .stat-value {
            font-size: 36px;
            font-weight: bold;
            color: #333;
            margin-bottom: 8px;
        }
        
        .stat-title {
            font-size: 16px;
            color: #666;
            margin-bottom: 10px;
            font-weight: 600;
        }
        
        .stat-description {
            color: #888;
            font-size: 13px;
            line-height: 1.4;
        }
        
        .recent-activities {
            background: white;
            border-radius: 10px;
            box-shadow: 0 3px 15px rgba(0,0,0,0.1);
            padding: 25px;
            margin-bottom: 30px;
        }
        
        .recent-activities h2 {
            color: #333;
            margin-bottom: 20px;
            font-size: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .activity-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .activity-item {
            padding: 15px 0;
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .activity-item:last-child {
            border-bottom: none;
        }
        
        .activity-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #f8f9ff;
            color: #667eea;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .activity-content {
            flex: 1;
        }
        
        .activity-content p {
            margin: 0 0 5px 0;
            color: #333;
        }
        
        .activity-time {
            font-size: 12px;
            color: #888;
        }
        
        .quick-actions {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
        }
        
        .quick-action-btn {
            background: white;
            border: 2px solid #f0f0f0;
            padding: 20px;
            border-radius: 8px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            color: #333;
        }
        
        .quick-action-btn:hover {
            border-color: #667eea;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
            color: #333;
            text-decoration: none;
        }
        
        .quick-action-btn i {
            font-size: 32px;
            color: #667eea;
            margin-bottom: 10px;
            display: block;
        }
        
        .quick-action-btn span {
            font-weight: 600;
            font-size: 14px;
        }
        
        @media (max-width: 768px) {
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .quick-actions {
                grid-template-columns: 1fr;
            }
        }

        .accordion-header {
            cursor: pointer;
            padding: 2px;
            background-color: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 5px;
            text-align: center;
            width: 30px;
            height: 30px;
        }
        
        .accordion-content {
            padding: 15px;
            border: 1px solid #dee2e6;
            border-top: none;
            border-radius: 0 0 5px 5px;
            display: none;
        }
        
        .accordion-header i {
            transition: transform 0.3s ease;
        }
        
        .accordion-header.active i {
            transform: rotate(180deg);
        }

        .search-div {
            width: calc(100% - 200px);
            height: calc(100% - 200px);
            padding: 0px;
            margin: 100px;
            z-index: 2000;
            border-radius: 10px;
            box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            background: white;
            position: fixed;
            display: block;
        }

        .comment-div {
            width: calc(100% - 800px);
            height: calc(100% - 600px);
            margin: 300px 400px;
            padding: 0px;
            z-index: 2000;
            border-radius: 10px;
            box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
            overflow: hidden;
            background: white;
            position: fixed;
            display: block;
        }

        .full-screen-mask {
            width: 100%;
            height: 100%;
            z-index: 1000;
            background: rgba(0, 0, 0, 0.4);
            position: fixed;
            display: block;
        }

        .unlink-btn {
            background: #fba039;
            color: #ffffff;
            border:1px solid #f36106;
            padding:10px 25px;
            border-radius:6px;
            margin-top: 10px;
        }

        .unlink-btn:hover {
            background:#c3382b;
            color: #ffffff;
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }

        .search-btn {
            background:#398afb;
            color: #ffffff;
            border:1px solid #3436ab;
            padding:10px 25px;
            border-radius:6px;
            margin-top: 10px;
        }

        .search-btn:hover {
            background:#3545f4;
            color: #ffffff;
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        }

        #ImageShowContainer{
            position: absolute;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            background: rgba(0, 0, 0, 0.5);
            z-index: 300;
            display: none; 
            justify-content: center; 
            align-items: center;
          }

          #ChartContainer{
            position: absolute;
            top: 0px;
            bottom: 0px;
            left: 0px;
            right: 0px;
            background: rgba(0, 0, 0, 0.5);
            z-index: 300;
            display: none; 
            justify-content: center; 
            align-items: center;
          }

        .chart-container {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
        }
        .chart-item {
            width: 80%;
            min-width: 1200px;
            height: 80%;
            min-height: 800px;
            margin-top: 5%;
            border: 1px solid #eee;
            border-radius: 8px;
            padding: 10px;
            background: #ffffff;

        }

        .close-btn {
            color: #ffffff;
            cursor: pointer;
            transition: all 0.3s ease;
            border-radius: 50%;
            width: 30px;
            height: 30px;
            font-size: 20px;
            align-items: center;
            margin-top: calc(5% - 25px);
            margin-left: 5px;
            display: flex; /* 将按钮变为弹性容器 */
            justify-content: center; /* 水平居中子元素 */
            align-items: center; /* 垂直居中子元素 */
        }

        .close-btn:hover {
            color: #000000;
            background: #a0a0a0;
        }