/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

/* 左侧菜单样式 */
.left-menu {
    width: 80px;
    background-color: #2c3e50;
    color: #fff;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.menu-item {
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    flex: 1;
}

.menu-item:hover {
    background-color: #34495e;
}

.menu-item.active {
    background-color: #e67e22;
}

.menu-item i {
    font-size: 18px;
    margin-bottom: 5px;
}

.menu-item span {
    font-size: 12px;
    white-space: nowrap;
}

/* 主内容区样式 */
.main-content {
    margin-left: 80px;
    min-height: 100vh;
    background-color: #f5f5f5;
}

/* 顶部导航栏样式 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.page-title {
    font-size: 18px;
    font-weight: bold;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

.system-name {
    margin-right: 20px;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
}

.logout-btn {
    margin-left: 10px;
    color: #e74c3c;
}

/* 顶部子菜单样式 */
.top-submenu {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.submenu-container {
    padding: 0 20px;
}

.submenu-group {
    display: flex;
    gap: 20px;
}

.submenu-item {
    padding: 10px 0;
    position: relative;
    cursor: pointer;
}

.submenu-item.active {
    color: #e67e22;
    font-weight: bold;
}

.submenu-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #e67e22;
}

/* 弹出式菜单样式 */
.dropdown-menu-container {
    background-color: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.dropdown-menu.show {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
}

.dropdown-menu-item a {
    padding: 5px 15px;
    border-radius: 4px;
}

.dropdown-menu-item a:hover {
    background-color: #f5f5f5;
}

.dropdown-menu-item a.active {
    background-color: #e67e22;
    color: #fff;
}

.dropdown-menu {
    display: none;
}

.dropdown-menu.show {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.dropdown-menu-item {
    padding: 5px 0;
}

.dropdown-menu-item a {
    display: block;
    color: #333;
    padding: 5px 15px;
    border-radius: 4px;
}

.dropdown-menu-item a:hover {
    color: #e67e22;
    background-color: #f0f0f0;
}

.dropdown-menu-item a.active {
    color: #fff;
    background-color: #e67e22;
    font-weight: bold;
}

/* 内容区样式 */
.content-wrapper {
    padding: 0 20px 20px 20px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 15px 20px;
    background-color: #fff;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
}

.content-header h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-primary {
    background-color: #e67e22;
    color: #fff;
}

.btn-primary:hover {
    background-color: #d35400;
}

.btn-secondary {
    background-color: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background-color: transparent;
    color: #666;
    transition: background-color 0.3s;
}

.btn-icon:hover {
    background-color: #f0f0f0;
    color: #e67e22;
}

.btn.disabled, .btn-sm.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 筛选区域样式 */
.filter-section {
    background-color: #fff;
    border-radius: 0;
    padding: 15px 20px;
    margin: 0;
    box-shadow: none;
    border-bottom: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 表单样式 */
.form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23333' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
}

/* 数据表格样式 */
.data-table-container {
    background-color: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    margin-bottom: 0;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table th, .data-table td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.data-table tbody tr:hover {
    background-color: #f9f9f9;
}

.data-table .action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    height: 100%;
    min-height: 40px;
    padding: 8px 0;
}

.btn-text {
    display: inline-block;
    padding: 2px 4px;
    font-size: 11px;
    color: #666;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s;
    background-color: transparent;
    white-space: nowrap;
}

.btn-text:hover {
    background-color: #f0f0f0;
    color: #e67e22;
}

.data-table td {
    vertical-align: middle;
}

.data-table th:last-child,
.data-table td:last-child {
    text-align: center;
    width: auto;
    min-width: 120px;
}

/* 确保状态列和操作列对齐 */
.data-table th:nth-child(8),
.data-table td:nth-child(8) {
    text-align: center;
    width: 80px;
    vertical-align: middle;
    padding: 12px 15px;
}

.data-table th:nth-child(9),
.data-table td:nth-child(9) {
    text-align: center;
    width: 180px;
    vertical-align: middle;
    padding: 12px 15px;
}

/* 状态列和操作列的新样式 */
.data-table .status-cell {
    text-align: center;
    vertical-align: middle;
    padding: 12px 15px;
    height: 48px;
}

.data-table .action-cell {
    text-align: center;
    vertical-align: middle;
    padding: 12px 15px;
    height: 48px;
}

.data-table .action-cell .action-buttons {
    display: flex;
    gap: 2px;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    flex-wrap: nowrap;
    min-height: 32px;
}

/* 图片列宽度 */
.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 60px;
    text-align: center;
}

/* 复选框列宽度 */
.data-table th:first-child,
.data-table td:first-child {
    width: 40px;
    text-align: center;
}

/* 商品编码列宽度 */
.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 120px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 商品名称列宽度 */
.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 380px;
    max-width: 380px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 分类列宽度 */
.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 10px;
    text-align: center;
    padding: 12px 5px;
}

/* 价格列宽度 */
.data-table th:nth-child(6),
.data-table td:nth-child(6) {
    width: 60px;
    text-align: right;
}

/* 库存列宽度 */
.data-table th:nth-child(7),
.data-table td:nth-child(7) {
    width: 40px;
    text-align: center;
}

/* 供应商列表列宽设置 */
/* 供应商名称列宽度（供应商列表专用） */
.supplier-table .data-table th:nth-child(2),
.supplier-table .data-table td:nth-child(2) {
    width: 150px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 供应商编码列宽度（供应商列表专用） */
.supplier-table .data-table th:nth-child(3),
.supplier-table .data-table td:nth-child(3) {
    width: 120px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 联系人列宽度（供应商列表专用） */
.supplier-table .data-table th:nth-child(4),
.supplier-table .data-table td:nth-child(4) {
    width: 100px;
    text-align: center;
}

/* 电话列宽度（供应商列表专用） */
.supplier-table .data-table th:nth-child(5),
.supplier-table .data-table td:nth-child(5) {
    width: 120px;
    text-align: center;
}

/* 地址列宽度（供应商列表专用） */
.supplier-table .data-table th:nth-child(6),
.supplier-table .data-table td:nth-child(6) {
    width: 200px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 操作列宽度（供应商列表专用） */
.supplier-table .data-table th:nth-child(7),
.supplier-table .data-table td:nth-child(7) {
    width: 120px;
    text-align: center;
    padding: 12px 20px;
}

/* 状态列宽度（供应商列表专用） */
.supplier-table .data-table th:nth-child(8),
.supplier-table .data-table td:nth-child(8) {
    width: 80px;
    text-align: center;
    padding: 12px 20px;
}

.status-active {
    color: #27ae60;
}

.status-inactive {
    color: #e74c3c;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 0 0 4px 4px;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.pagination-info {
    color: #666;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 4px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    font-size: 18px;
    margin: 0;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 仪表盘样式 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dashboard-card-title {
    font-size: 16px;
    font-weight: bold;
}

.dashboard-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e67e22;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.dashboard-card-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.dashboard-card-description {
    color: #666;
    font-size: 12px;
}

.dashboard-chart {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.dashboard-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dashboard-chart-title {
    font-size: 16px;
    font-weight: bold;
}

.dashboard-chart-container {
    height: 300px;
}

/* 商品分组页面样式 */
.group-products-container {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.group-products-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
    width: 60%;
}

.filter-box {
    width: 30%;
}

.group-products-content {
    display: flex;
    height: 400px;
    gap: 15px;
}

.available-products, .selected-products {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px;
    overflow-y: auto;
}

.group-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.product-image-placeholder {
    width: 50px;
    height: 50px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

.product-details {
    flex: 1;
}

.product-name {
    font-weight: bold;
}

.product-code, .product-price {
    font-size: 12px;
    color: #666;
}

/* 商品分类表格样式 */
.subcategory td:nth-child(3) {
    padding-left: 30px;
}

/* 登录注册页面样式 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.auth-box {
    width: 400px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-control {
    width: 100%;
}

.auth-form .btn {
    width: 100%;
    padding: 10px;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.auth-links a {
    color: #e67e22;
}

.auth-links a:hover {
    text-decoration: underline;
}

.invalid-feedback {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.is-invalid {
    border-color: #e74c3c;
}

/* 商品概况页面样式 */
.dashboard-overview {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.overview-title {
    font-size: 18px;
    font-weight: bold;
}

.overview-date {
    color: #666;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    padding: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.stat-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #e67e22;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    font-size: 12px;
}

.stat-change.positive {
    color: #27ae60;
}

.stat-change.negative {
    color: #e74c3c;
}

/* 快捷功能区域 */
.quick-actions {
    margin-bottom: 30px;
}

.quick-actions-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.quick-action-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    font-size: 24px;
    color: #e67e22;
    margin-bottom: 10px;
}

.quick-action-text {
    font-size: 14px;
}

/* 价格区间样式 */
.price-range {
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-range .form-control {
    width: 100px;
}