/* 基础样式重置，适配420*800分辨率 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", Arial, Helvetica, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
    padding: 5px;
    -webkit-tap-highlight-color: transparent;
    /*tap-highlight-color: transparent;*/
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.4;
}

/* 登录容器样式 */
.login-container {
    display: block;
    padding: 10px 8px;
    /* 缩减内边距 */
    margin-top: 15px;
    /* 缩减外边距 */
}

.login-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 12px;
    /* 缩减内边距 */
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 15px;
    /* 缩减外边距 */
    color: #2c3e50;
    font-size: 20px;
    /* 缩小字体 */
    font-weight: 600;
    padding-bottom: 8px;
    /* 缩减内边距 */
    border-bottom: 1px solid #eee;
}

/* 登录提示样式 */
.login-tip {
    margin-top: 6px;
    /* 缩减外边距 */
    padding: 4px 6px;
    /* 缩减内边距 */
    font-size: 12px;
    text-align: center;
    border-radius: 4px;
    display: none;
}

.login-tip.error {
    color: #f56c6c;
    background-color: #fef0f0;
    border: 1px solid #fde2e2;
}

/* 单选组样式 */
/* 单选组容器：直接使用小屏幕的适配样式 */
.radio-group {
    margin-bottom: 12px;
    /* 小屏幕间距 */
    padding: 5px;
    /* 小屏幕内边距 */
    background-color: #f9fafb;
    border-radius: 8px;
    max-width: 100%;
    /* 适应屏幕宽度 */
}

/* 单选组标题：小屏幕样式 */
.radio-group label.title {
    display: block;
    /* 小屏幕间距 */
    font-weight: 600;
    color: #1f2937;
    font-size: 13px;
    /* 小屏幕文字大小 */
    line-height: 1.5;
}

/* 单选项容器：小屏幕间距 */
.radio-items {
    display: flex;
    /* 小屏幕选项间距 */
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

/* 单个单选项：小屏幕触控优化样式 */
.radio-item {
    display: flex;
    align-items: center;
    gap: 5px;
    /* 小屏幕按钮与文字间距 */
    font-size: 13px;
    /* 小屏幕文字大小 */
    color: #374151;
    cursor: pointer;
    position: relative;
    padding: 5px 0px;
    /* 扩大触控区域，适配手指点击 */
    border-radius: 6px;
    transition: background-color 0.2s ease;
    min-width: 70px;
    /* 保证选项有足够宽度 */
    /*justify-content: center;*/
    /* 文字居中，排列更整齐 */
}

/* 单选项悬停态 */
.radio-item:hover {
    background-color: #f3f4f6;
}

/* 隐藏原生单选按钮：小屏幕放大尺寸 */
.radio-item input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    /* 小屏幕放大按钮 */
    height: 18px;
    border: 2px solid #94a3b8;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease;
}

/* 单选按钮选中态 */
.radio-item input[type="radio"]:checked {
    border-color: #3b82f6;
}

/* 选中态的内部圆点：同步放大 */
.radio-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    /* 小屏幕放大圆点 */
    height: 9px;
    border-radius: 50%;
    background-color: #3b82f6;
}

/* 单选按钮聚焦态（无障碍设计） */
.radio-item input[type="radio"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* 选中态的文字颜色 */
.radio-item input[type="radio"]:checked+label {
    color: #3b82f6;
    font-weight: 500;
}

/* 标签样式优化：移动端专属 */
.radio-item label {
    cursor: pointer;
    line-height: 1.5;
    transition: color 0.2s ease;
    user-select: none;
    /* 禁止文字被误选中 */
    -webkit-user-select: none;
    /* 兼容webkit内核 */
}

.form-group {
    margin-bottom: 10px;
    /* 缩减外边距 */
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    /* 缩减外边距 */
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 8px 6px;
    /* 缩减内边距 */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    /* 缩小字体 */
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-group input:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.login-btn {
    width: 100%;
    padding: 8px;
    /* 缩减内边距 */
    background-color: #409eff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    /* 缩小字体 */
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(64, 158, 255, 0.2);
    margin-top: 6px;
    /* 缩减外边距 */
}

.login-btn:hover {
    background-color: #3393e6;
}

/* 功能容器样式 */
.function-container {
    display: none;
    width: 100%;
}

/* 功能标题栏样式 - 调整布局：左侧下拉菜单，中间信息，右侧返回按钮 */
.function-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 8px;
    /* 缩减内边距 */
    margin-bottom: 8px;
    /* 缩减外边距 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 功能模块下拉选择菜单样式 */
.function-select {
    padding: 3px 6px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    color: #409eff;
    border: 1px solid #d1e7ff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(64, 158, 255, 0.1);
    outline: none;
}

.function-select:hover {
    background: linear-gradient(135deg, #e6f0ff 0%, #d1e7ff 100%);
    border-color: #409eff;
}

/* 返回登录按钮样式 - 移到右侧 */
.back-to-login-btn {
    padding: 3px 8px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    color: #409eff;
    border: 1px solid #d1e7ff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(64, 158, 255, 0.1);
}

.back-to-login-btn:hover {
    background: linear-gradient(135deg, #e6f0ff 0%, #d1e7ff 100%);
    border-color: #409eff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(64, 158, 255, 0.15);
}

.back-to-login-btn:active {
    transform: translateY(0);
}

/* 登录信息标题样式 */
.login-info-title {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 8px;
    line-height: 1.2;
}

/* 功能模块内容容器 */
.function-content {
    display: none;
}

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

/* 上架移动模块样式 */
.shelve-module {
    width: 100%;
}

/* 分步页面样式 */
.step-page {
    display: none;
}

.step-page.active {
    display: block !important;
}

/* 标题栏样式 */
.title-bar {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    /* 缩减外边距 */
}

/* 返回按钮样式 */
.back-btn {
    padding: 4px 8px;
    /* 缩减内边距 */
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
    color: #409eff;
    border: 1px solid #d1e7ff;
    border-radius: 4px;
    font-size: 12px;
    /* 缩小字体 */
    cursor: pointer;
    margin-right: 6px;
    /* 缩减外边距 */
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(64, 158, 255, 0.1);
}

.back-btn:hover {
    background: linear-gradient(135deg, #e6f0ff 0%, #d1e7ff 100%);
    border-color: #409eff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(64, 158, 255, 0.15);
}

.back-btn:active {
    transform: translateY(0);
}

.page-title {
    font-size: 16px;
    /* 缩小字体 */
    color: #2c3e50;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-title1 {
    font-size: 12px;
    /* 缩小字体 */
    color: #2c3e50;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 表单项目样式 */
.form-item {
    width: 100%;
    margin-bottom: 8px;
    /* 缩减外边距 */
    /*左右布局*/
}

.form-item label {
    display: block;
    margin-bottom: 3px;
    margin-left: 5px;
    /* 缩减外边距 */
    font-weight: 600;
    color: #444;
    font-size: 12px;
}

.form-item input,
.form-item textarea,
.form-item select {
    width: 100%;
    padding: 8px 6px;
    /* 缩减内边距 */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    /* 缩小字体 */
    transition: border-color 0.2s ease;
    font-family: inherit;
}

/* 备注输入框样式 */
.form-item textarea {
    min-height: 50px;
    /* 缩减高度 */
    resize: none;
    font-size: 13px;
}

.form-item input:focus,
.form-item textarea:focus,
.form-item select:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.form-item .input-tip {
    font-size: 12px;
    color: #999;
    margin-top: 3px;
    /* 缩减外边距 */
    line-height: 1.3;
}

/* 按钮样式 */
.next-btn,
.submit-btn,
.continue-btn,
.query-btn,
.modify-btn,
.confirm-btn {
    padding: 8px 0;
    /* 缩减内边距 */
    width: 100%;
    background-color: #409eff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    /* 缩小字体 */
    cursor: pointer;
    margin-top: 6px;
    /* 缩减外边距 */
    transition: background-color 0.2s ease;
    font-family: inherit;
    font-weight: 500;
}

.next-btn:hover,
.query-btn:hover {
    background-color: #3393e6;
}

.submit-btn {
    background-color: #67c23a;
}

.submit-btn:hover {
    background-color: #5cb837;
}

.continue-btn {
    background-color: #409eff;
}

/* 查询界面专属样式 */
.query-condition-page {
    display: block;
}

.query-result-page {
    display: none;
}

/* 查询结果统计样式 */
.result-count {
    text-align: center;
    font-size: 14px;
    /* 缩小字体 */
    color: #666;
    margin-bottom: 0px;
    padding: 4px;
    /* 缩减内边距 */
    background-color: #f8f9fa;
    border-radius: 4px;
    font-weight: 500;
    display: none;
}

/* 新增：查询结果滚动容器 - 仅让resultCards滑动 */
.result-scroll-container {
    width: 100%;
    /*max-height: 300px;*/
    /* 可根据需求调整高度 */
    min-height: 300px;
    overflow-y: auto;
    padding-right: 3px;
    /* 避免滚动条遮挡内容 */
    margin-top: 8px;
}

/* 查询结果卡片样式 */
.result-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* 缩减卡片间距 */
}

/* 物料卡片样式 */
.material-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
    border: 1px solid #e8f4ff;
    border-radius: 6px;
    /* 缩小圆角 */
    padding: 10px 8px;
    /* 缩减内边距 */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(64, 158, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.material-card:hover {
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.12);
    /*transform: translateY(-2px);*/
    border-color: #409eff;
}

/* 卡片行布局 */
.card-row-flex {
    display: flex;
    justify-content: space-around;
    /* align-items: center; */
    margin-bottom: 8px;
    /* 缩减行间距 */
    text-align: center;
}

.card-row-flex:last-child {
    margin-bottom: 0;
}

/* 卡片项目样式 */
.card-item {
    flex: 1;
    padding: 0 6px;
    /* 缩减内边距 */
    position: relative;
}

.card-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    /* 缩减分隔线宽度 */
    height: 60%;
    background-color: #d0d9e6;
}

/* 库存项目样式 */
.stock-item {
    width: 100%;
    text-align: center;
}

.stock-label {
    color: #666;
    font-size: 11px;
    /* 缩小字体 */
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.stock-content-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    /* 缩减间距 */
}

.stock-value {
    color: #333;
    font-size: 13px;
    /* 缩小字体 */
    font-weight: 600;
}

/* 铅笔图标样式 */
.pencil-icon {
    font-size: 14px;
    /* 缩小字体 */
    color: #409eff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.pencil-icon:hover {
    color: #3393e6;
    transform: scale(1.1);
}

.card-label {
    color: #666;
    font-size: 11px;
    /* 缩小字体 */
    display: block;
    margin-bottom: 2px;
    /* 缩减外边距 */
    font-weight: 500;
}

.card-value {
    color: #2c3e50;
    font-size: 13px;
    /* 缩小字体 */
    font-weight: 600;
    display: block;
}

/* 分隔线样式 */
.card-divider {
    height: 1px;
    /* 缩减分隔线高度 */
    background: linear-gradient(90deg, transparent, #c5d9f0, transparent);
    margin: 6px 0;
    /* 缩减间距 */
    border: none;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 物料描述样式 */
.material-desc {
    font-size: 12px;
    /* 缩小字体 */
    color: #444;
    line-height: 1.4;
    word-wrap: break-word;
    text-align: center;
    padding: 0 5px;
    font-weight: 400;
    margin-bottom: 0;
}

/* 修改成功提示样式 */
.modify-success-tip {
    font-size: 11px;
    /* 缩小字体 */
    color: #67c23a;
    text-align: center;
    margin-top: 6px;
    /* 缩减外边距 */
    padding: 3px 6px;
    /* 缩减内边距 */
    background-color: #f0f9ff;
    border-radius: 4px;
    display: none;
    border: 1px solid #e1f3d8;
}

/* 无数据提示 */
.no-data {
    text-align: center;
    padding: 10px;
    /* 缩减内边距 */
    color: #999;
    font-size: 13px;
    /* 缩小字体 */
    margin-top: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: none;
}

/* 弹窗遮罩层样式 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 0 10px;
}

/* 弹窗内容样式 */
.modal-content {
    background-color: white;
    border-radius: 6px;
    padding: 12px;
    /* 缩减内边距 */
    width: 100%;
    max-width: 380px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 弹窗标题样式 */
.modal-title {
    font-size: 15px;
    /* 缩小字体 */
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 12px;
    /* 缩减外边距 */
    text-align: center;
}

/* 弹窗物料信息样式 */
.modal-material-info {
    margin-bottom: 12px;
    /* 缩减外边距 */
    font-size: 13px;
    /* 缩小字体 */
    line-height: 1.5;
}

.modal-info-item {
    margin-bottom: 6px;
    /* 缩减外边距 */
    display: flex;
    flex-wrap: wrap;
}

.modal-info-label {
    font-weight: 600;
    color: #444;
    min-width: 70px;
    /* 缩减宽度 */
}

.modal-info-value {
    color: #333;
    flex: 1;
    word-wrap: break-word;
}

/* 弹窗表单样式 */
.modal-form-item {
    margin-bottom: 8px;
    /* 缩减外边距 */
}

.modal-form-item label {
    display: block;
    margin-bottom: 3px;
    /* 缩减外边距 */
    font-weight: 600;
    color: #444;
    font-size: 13px;
    /* 缩小字体 */
}

.modal-form-item input,
.modal-form-item select {
    width: 100%;
    padding: 8px 6px;
    /* 缩减内边距 */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    /* 缩小字体 */
    font-family: inherit;
}

.modal-form-item input:focus,
.modal-form-item select:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* 弹窗按钮组样式 */
.modal-btn-group {
    display: flex;
    gap: 6px;
    /* 缩减间距 */
    margin-top: 12px;
    /* 缩减外边距 */
}

.modal-btn {
    flex: 1;
    padding: 8px 0;
    /* 缩减内边距 */
    border: none;
    border-radius: 4px;
    font-size: 14px;
    /* 缩小字体 */
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.modal-confirm-btn {
    background-color: #67c23a;
    color: white;
}

.modal-confirm-btn:hover {
    background-color: #5cb837;
}

.modal-close-btn {
    background-color: #909399;
    color: white;
}

.modal-close-btn:hover {
    background-color: #73767a;
}

/* 新增：物料编码+客户编码组合项样式 */
.material-code-group {
    text-align: center;
}

.code-main {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    display: block;
}

.code-sub {
    font-size: 11px;
    color: #666;
    display: block;
    margin-top: 2px;
}

/* 新增：数量相关行的布局优化 */
.quantity-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 8px;
    text-align: center;
}

.quantity-item {
    flex: 1;
    padding: 0 6px;
    position: relative;
}

.quantity-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60%;
    background-color: #d0d9e6;
}

/* 适配420*800分辨率的媒体查询 */
@media (width: 420px) and (height: 800px),
(max-width: 420px) {
    body {
        padding: 3px;
        max-width: 420px;
    }

    .login-card {
        padding: 10px 6px;
        /* 进一步缩减内边距 */
        max-width: 360px;
    }

    .function-container {
        padding: 0 3px;
    }

    .function-header {
        padding: 4px 6px;
        /* 进一步缩减内边距 */
    }

    .function-select {
        padding: 2px 4px;
        /* 进一步缩减内边距 */
        font-size: 11px;
    }

    .back-to-login-btn {
        padding: 2px 6px;
        /* 进一步缩减内边距 */
        font-size: 11px;
    }

    .login-info-title {
        font-size: 11px;
        margin: 0 6px;
        /* 进一步缩减间距 */
    }

    .form-item input {
        padding: 6px 4px;
        /* 进一步缩减内边距 */
        font-size: 13px;
        /* 进一步缩小字体 */
    }

    .form-item textarea {
        min-height: 40px;
        /* 进一步缩减高度 */
        font-size: 12px;
        /* 进一步缩小字体 */
    }

    .material-card {
        padding: 8px 6px;
        /* 进一步缩减内边距 */
    }

    .card-label {
        font-size: 10px;
        /* 进一步缩小字体 */
    }

    .card-value {
        font-size: 12px;
        /* 进一步缩小字体 */
    }

    .stock-label {
        font-size: 10px;
        /* 进一步缩小字体 */
    }

    .stock-value {
        font-size: 12px;
        /* 进一步缩小字体 */
    }

    .pencil-icon {
        font-size: 13px;
        /* 进一步缩小字体 */
    }

    .material-desc {
        font-size: 11px;
        /* 进一步缩小字体 */
    }

    .modify-success-tip {
        font-size: 10px;
        /* 进一步缩小字体 */
        padding: 2px 4px;
        /* 进一步缩减内边距 */
    }

    .result-count {
        font-size: 12px;
    }

    .back-btn {
        padding: 3px 6px;
        /* 进一步缩减内边距 */
        font-size: 11px;
        /* 进一步缩小字体 */
    }

    .modal-content {
        padding: 10px;
        /* 进一步缩减内边距 */
        max-width: 360px;
    }

    .modal-title {
        font-size: 14px;
        /* 进一步缩小字体 */
        margin-bottom: 10px;
        /* 进一步缩减外边距 */
    }

    .modal-btn {
        padding: 6px 0;
        /* 进一步缩减内边距 */
        font-size: 13px;
        /* 进一步缩小字体 */
    }

    /* 适配小屏幕的组合编码样式 */
    .code-main {
        font-size: 12px;
    }

    .code-sub {
        font-size: 10px;
    }
}

/* 新增：发料模块按钮组样式 */
.material-card .btn-group {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.modify-btn {
    background-color: #409eff;
    width: 50%;
    padding: 6px 0;
}

.modify-btn:hover {
    background-color: #3393e6;
}

.confirm-btn {
    background-color: #67c23a;
    width: 50%;
    padding: 6px 0;
}

.confirm-btn:hover {
    background-color: #5cb837;
}

/* 新增：Toast弹窗样式 */
.toast-mask {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    padding: 10px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}

.toast-mask.show {
    opacity: 1;
}

.toast-success {
    background-color: rgba(67, 181, 129, 0.9);
}

.toast-error {
    background-color: rgba(245, 108, 108, 0.9);
}

.toast-info {
    background-color: rgba(64, 158, 255, 0.9);
}
.TextDisplay{
    font-size: 12px;
    color: #30ce3d;
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    margin-left: 5px;
}
