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

body {
    font-family: 'Microsoft YaHei', 'SimSun', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* 登录界面样式（电脑版） */
.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

/* 轮播容器样式（无边框，优化美观，使用16:9比例，无圆角） */
.carousel-container {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 300px;
    margin-bottom: 50px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #000;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-item img,
.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    outline: none;
    display: block;
}

.carousel-item video {
    background: #000;
    -webkit-playsinline: true;
    playsinline: true;
    webkit-playsinline: true;
}

/* 登录表单（融合在背景中，无白色容器） */
.login-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 50px 40px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    min-width: 350px;
    margin-top: auto;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

/* PC端登录框改成长方形 */
@media screen and (min-width: 768px) {
    .login-box {
        max-width: 600px;
        min-width: 500px;
        padding: 40px 60px;
    }
}

.login-box h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #ffffff;
    font-size: 32px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.modal-content .form-group input,
.modal-content .form-group textarea {
    background-color: #fff !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

.modal-content .form-group input:focus,
.modal-content .form-group textarea:focus {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #007bff !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25) !important;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    font-size: 16px; /* iOS Safari需要至少16px避免自动缩放 */
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* iOS特定修复：登录输入框 */
#username,
#password {
    font-size: 16px !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    width: 100% !important;
    padding: 10px 15px !important;
    box-sizing: border-box !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.error-message {
    color: #ffebee;
    background-color: rgba(231, 76, 60, 0.8);
    padding: 12px 16px;
    margin-bottom: 20px;
    text-align: center;
    border-radius: 0;
    display: none;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.error-message.show {
    display: block;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 0;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
    transition: background-color 0.3s, transform 0.1s;
}

/* 导航栏中的按钮不需要100%宽度 */
.navbar .btn-secondary {
    width: auto;
    padding: 14px 28px;
    font-size: 18px;
    font-weight: 600;
    min-height: 50px;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 主界面样式 */
.main-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 导航栏样式（电脑版） */
.navbar {
    background-color: #343a40;
    color: white;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 15px;
    min-height: 50px;
    /* 移除固定定位，允许滚动消失 */
    position: relative;
    flex-shrink: 0;
}

/* 导航栏左侧区域（搜索相关元素） */
.navbar-left {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 8px;
    flex-wrap: nowrap;
}

/* 导航栏右侧区域（用户信息） */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-btn {
    background-color: #495057;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
    white-space: nowrap;
    width: auto; /* 宽度自适应内容 */
    min-width: fit-content; /* 最小宽度适应内容 */
    flex: 0 0 auto; /* 不拉伸，不收缩，保持原始大小 */
    box-sizing: border-box;
}

.nav-btn:hover {
    background-color: #5a6268;
}

.nav-btn.active {
    background-color: #667eea;
}

/* 非管理员导出和退出按钮样式 */
.nav-btn-export {
    background-color: #28a745 !important; /* 绿色 */
    /* 确保大小与其他按钮一致 */
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 2px !important;
}

.nav-btn-export:hover {
    background-color: #218838 !important;
}

.nav-btn-logout {
    background-color: #dc3545 !important; /* 红色 */
    /* 确保大小与其他按钮一致 */
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 2px !important;
}

.nav-btn-logout:hover {
    background-color: #c82333 !important;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* 导航栏左侧区域（搜索相关元素） */
.navbar-left {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0;
}

.message-icon {
    position: relative;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.unread-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.message-toolbar {
    margin-bottom: 20px;
}

.message-list {
    max-height: 500px;
    overflow-y: auto;
}

.message-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.2s;
}

.message-item:hover {
    background-color: #f0f0f0;
}

.message-item.unread {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.message-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-item-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.message-item-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 15px;
}

.message-item-content {
    color: #555;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.message-item-actions .btn {
    padding: 5px 15px;
    font-size: 12px;
}

.message-detail {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message-detail-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.message-detail-meta {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.message-detail-content {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    color: #333;
}

.user-info span {
    font-weight: bold;
}

/* 管理员库房选择下拉框样式 */
.admin-warehouse-search {
    display: flex;
    align-items: center;
    margin: 0;
    flex: 0 0 auto;
}

.admin-warehouse-search label {
    white-space: nowrap;
    margin-right: 10px;
    font-weight: bold;
    color: white;
}

.admin-warehouse-search select {
    padding: 6px 12px;
    border: 1px solid #495057;
    border-radius: 5px;
    background-color: white;
    color: #333;
    font-size: 13px;
    box-sizing: border-box;
    min-width: 150px;
    cursor: pointer;
}

.admin-warehouse-search input[type="text"] {
    padding: 10px 15px;
    border: 1px solid #495057;
    border-radius: 5px;
    background-color: white;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
    min-width: 200px;
}

.admin-warehouse-search input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.admin-warehouse-search .btn {
    padding: 10px 20px;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
}

.admin-warehouse-search select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

/* 客户下拉框样式 */
.customer-select-container {
    display: flex;
    align-items: center;
    margin: 0;
    flex: 0 0 auto;
}

.customer-select-container select {
    padding: 6px 12px;
    border: 1px solid #495057;
    border-radius: 5px;
    background-color: white;
    color: #333;
    font-size: 13px;
    min-width: 150px;
    cursor: pointer;
    box-sizing: border-box;
}

.customer-select-container select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* 款号搜索框样式（所有用户可见） */
.style-no-search-container {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    margin: 0;
    flex: 0 0 auto;
    gap: 12px;
}

.style-no-search-container input[type="text"] {
    padding: 6px 12px;
    border: 1px solid #495057;
    border-radius: 5px;
    background-color: white;
    color: #333;
    font-size: 13px;
    min-width: 200px;
    max-width: 300px;
    margin-right: 8px;
    box-sizing: border-box;
}

.style-no-search-container input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.style-no-search-container > div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
}

.style-no-search-container .btn {
    padding: 6px 15px;
    font-size: 13px;
    margin: 0 4px;
    white-space: nowrap;
}

/* 内容区域（电脑版） */
/* 页面内容样式（直接应用在page上） */
.page {
    flex: 1;
    display: none;
    padding: 30px 40px;
    padding-bottom: 80px; /* 为底部合计栏留出空间 */
    overflow-y: auto;
    overflow-x: auto; /* 允许横向滚动 */
    background-color: #f5f5f5;
}

/* 固定在屏幕底部的合计行 */
.data-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background-color: #f0f0f0;
}

.data-table tfoot tr.fixed-summary-row {
    position: sticky;
    bottom: 0;
    background-color: #f0f0f0 !important;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

/* .page 样式已在上面定义，这里只保留 active 状态 */
.page.active {
    display: block;
}

.page h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* 库房页面标题样式 - 减小字体和间距 */
.warehouse-page h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    padding: 0;
}

/* 工具栏（电脑版） */
.toolbar {
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 表格样式（电脑版） */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    table-layout: auto; /* 自适应列宽 */
    min-width: 100%; /* 最小宽度为100% */
}

.data-table thead {
    background-color: #667eea;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table thead th {
    text-align: center;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    white-space: nowrap; /* 防止文本换行，保持单行显示 */
}

.data-table th {
    font-weight: 600;
    white-space: nowrap;
    min-width: fit-content; /* 根据内容自适应最小宽度 */
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

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

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 35px 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 10001 !important;
    pointer-events: auto !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

.close:hover {
    color: #333;
    background-color: #f0f0f0;
}

.modal-content h2 {
    margin-bottom: 25px;
    color: #333;
    font-size: 22px;
    font-weight: 600;
    padding-right: 40px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.modal-buttons .btn {
    min-width: 100px;
    padding: 10px 20px;
}

/* 库房页面样式 */
.warehouse-pages {
    display: contents;
}

.warehouse-page {
    display: none;
    padding-top: 0 !important; /* 无顶部间距，紧贴导航栏 */
    padding-left: 40px; /* 保留左右间距 */
    padding-right: 40px;
    padding-bottom: 80px; /* 保留底部间距 */
}

.warehouse-page.active {
    display: block;
}

/* 标签页样式 */
.page-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
}

.tab-content {
    display: none;
}

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

/* 公共字段批量填写区域 */
.common-fields-section {
    background: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.common-fields-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.common-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.common-fields-grid .form-group {
    margin-bottom: 0;
}

.common-fields-grid label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: #666;
    font-weight: normal;
}

.common-fields-grid input,
.common-fields-grid select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

/* WPS样式表格 */
.wps-table {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

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

.wps-style-table thead {
    background: linear-gradient(to bottom, #f5f5f5, #e8e8e8);
}

.wps-style-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #d0d0d0;
    color: #333;
    font-size: 13px;
    background: linear-gradient(to bottom, #fafafa, #f0f0f0);
}

.wps-style-table td {
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    background-color: white;
    font-size: 13px;
}

.wps-style-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.wps-style-table tbody tr:hover {
    background-color: #f0f7ff;
}

.wps-style-table tbody tr:hover td {
    background-color: #f0f7ff;
}

/* 可编辑表格样式 */
.editable-table input,
.editable-table select,
.editable-table textarea {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
}

.editable-table input:focus,
.editable-table select:focus,
.editable-table textarea:focus {
    border: 1px solid #4a90e2;
    background-color: #fff;
    box-shadow: 0 0 0 1px #4a90e2;
}

.editable-table input[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #666;
}

.editable-table td {
    padding: 4px 6px !important;
    position: relative;
}

.editable-table tbody tr {
    background-color: #fff;
}

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

.editable-table tbody tr:hover {
    background-color: #f0f7ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 登录界面移动端优化 */
    .container {
        padding: 15px;
        min-height: 100vh;
    }
    
    .carousel-container {
        max-width: 100%;
        aspect-ratio: 16 / 9;
        height: auto;
        min-height: 200px;
        max-height: 50vh;
        margin-bottom: 30px;
        margin-top: 15px;
        border-radius: 0;
    }
    
    .login-box {
        max-width: 100%;
        min-width: auto;
        padding: 35px 25px;
        margin-bottom: 40px;
        border-radius: 15px;
    }
    
    .login-box h1 {
        font-size: 26px;
        margin-bottom: 30px;
    }
    
    .form-group input {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .btn-primary {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 8px;
    }

    .nav-buttons {
        width: 100%;
        justify-content: flex-start; /* 改为左对齐，让按钮紧凑排列 */
        display: flex; /* 改为flex布局，让按钮自适应宽度 */
        flex-wrap: wrap; /* 允许换行 */
        gap: 4px; /* 减小间距，让按钮更紧凑 */
        max-height: none; /* 不限制高度，允许2行显示 */
    }
    
    .nav-btn {
        width: auto !important; /* 移动端也自适应宽度，使用!important确保优先级 */
        min-width: fit-content !important; /* 最小宽度适应内容 */
        max-width: none !important; /* 不限制最大宽度 */
        flex: 0 0 auto !important; /* 不拉伸，不收缩，保持原始大小 */
        padding: 3px 8px !important; /* 减小内边距 */
        font-size: 10px !important; /* 减小字体大小 */
        border-radius: 2px !important; /* 减小圆角 */
        box-sizing: border-box;
        line-height: 1.2; /* 减小行高，让按钮更紧凑 */
    }
    
    /* 移动端非管理员导出和退出按钮样式，确保大小一致 */
    .nav-btn-export,
    .nav-btn-logout {
        padding: 3px 8px !important;
        font-size: 10px !important;
        border-radius: 2px !important;
    }
    
    /* 移动端管理员库房导出按钮样式，确保大小与其他按钮一致 */
    #exportWarehouseBtn {
        padding: 3px 8px !important;
        font-size: 10px !important;
        border-radius: 2px !important;
        width: auto !important;
        flex: 0 0 auto !important;
        min-width: fit-content !important;
    }

    /* 移动端导航栏左侧区域 */
    .navbar-left {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .admin-warehouse-search {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .admin-warehouse-search select {
        width: 100%;
        min-width: 0;
    }

    .customer-select-container {
        width: 100%;
        margin: 0;
    }
    
    .customer-select-container select {
        width: 100%;
        min-width: 0;
    }

    .style-no-search-container {
        width: 100%;
        margin: 0;
        flex-direction: column !important;
        gap: 8px;
    }
    
    .style-no-search-container input[type="text"] {
        width: 100%;
        min-width: 0;
        margin-right: 0;
    }
    
    .style-no-search-container > div {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        width: 100% !important;
        align-items: center !important;
    }
    
    /* 管理员移动端专用布局：库房列表、客户列表、搜索框在第一行，按钮在第二行 */
    /* 当navbar-left包含adminWarehouseSearch时，说明是管理员模式 */
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        align-items: flex-start !important;
    }
    
    /* 管理员模式：库房列表长度减少四分之三（变为1/4） */
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .admin-warehouse-search {
        width: calc(25% - 3px) !important;
        flex: 0 0 calc(25% - 3px) !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
    
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .admin-warehouse-search select {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 11px !important;
        padding: 4px 6px !important;
    }
    
    /* 管理员模式：客户列表长度减少四分之三（变为1/4） */
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .customer-select-container {
        width: calc(25% - 3px) !important;
        flex: 0 0 calc(25% - 3px) !important;
        margin: 0 !important;
    }
    
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .customer-select-container select {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 11px !important;
        padding: 4px 6px !important;
    }
    
    /* 管理员模式：搜索框长度减少四分之三（变为1/4） */
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .style-no-search-container {
        width: calc(25% - 3px) !important;
        flex: 0 0 calc(25% - 3px) !important;
        margin: 0 !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .style-no-search-container input[type="text"] {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 11px !important;
        padding: 4px 6px !important;
        margin: 0 !important;
    }
    
    /* 管理员模式：按钮容器占满第二行 */
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .style-no-search-container > div {
        width: calc(100vw - 20px) !important;
        flex: 0 0 100% !important;
        margin: 4px 0 0 0 !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 3px !important;
        position: relative !important;
        left: calc(-25% - 1px) !important;
    }
    
    /* 管理员模式：按钮统一尺寸 */
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .style-no-search-container > div .btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        padding: 6px 4px !important;
        font-size: 10px !important;
        white-space: nowrap !important;
        margin: 0 !important;
    }
    
    /* 管理员模式：站内信图标不拉伸 */
    .navbar-left:has(#adminWarehouseSearch[style*="flex"]) .message-icon {
        flex: 0 0 auto !important;
        margin: 0 2px !important;
        font-size: 18px !important;
    }
    
    .style-no-search-container .btn {
        flex: 1;
        min-width: 60px;
        padding: 6px 15px;
        font-size: 13px;
        white-space: nowrap;
        margin: 0;
    }
    
    .style-no-search-container .message-icon {
        font-size: 20px !important;
        margin: 0 4px;
        flex-shrink: 0;
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .style-no-search-container .message-icon .unread-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background-color: #e74c3c;
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        font-weight: bold;
    }

    .user-info {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: 0;
    }
    
    .user-info > span {
        /* 当前用户信息 */
        width: 100%;
        text-align: center;
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 移动端导航栏优化 - 更紧凑，只包住搜索框下边框 */
    .navbar {
        padding: 8px 10px 1px 10px;
        gap: 6px;
        min-height: auto;
        overflow-x: hidden;
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    }
    
    /* 移动端导航栏左侧区域 - 减少底部间距 */
    .navbar-left {
        margin-bottom: 0;
        gap: 6px;
    }
    
    /* 移动端搜索框容器 - 减少底部间距 */
    .style-no-search-container {
        margin-bottom: 0;
    }
    
    /* 移动端搜索框按钮行 - 减少间距 */
    .style-no-search-container > div {
        gap: 3px;
        margin-bottom: 0;
    }
    
    .message-icon {
        font-size: 20px;
    }
    
    .unread-badge {
        width: 18px;
        height: 18px;
        font-size: 11px;
        top: -6px;
        right: -6px;
    }

    .toolbar {
        flex-direction: column;
    }

    .data-table {
        font-size: 12px;
        table-layout: auto; /* 自适应列宽 */
        overflow-x: auto; /* 允许横向滚动 */
    }

    .data-table th,
    .data-table td {
        padding: 8px;
        white-space: nowrap; /* 防止文本换行 */
    }
    
    .data-table th {
        min-width: fit-content; /* 根据内容自适应最小宽度 */
    }
    
    /* 移动端合计栏样式 */
    .summary-bar {
        padding: 12px 15px;
        min-height: 50px;
        font-size: 14px;
    }
    
    .summary-content {
        font-size: 14px;
    }
    
    #summaryText {
        font-size: 16px;
    }
    
    .page {
        padding-bottom: 70px; /* 移动端为合计栏留出空间 */
        padding: 15px 20px; /* 移动端减少内边距 */
    }
}

