/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.5;
    font-size: 14px;
}
/* 统一按钮样式 */
button {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}
button:active {
    transform: scale(0.98);
}
.btn-primary {
    background: #1890ff;
    color: white;
}
.btn-primary:hover {
    background: #40a9ff;
}
.btn-success {
    background: #52c41a;
    color: white;
}
.btn-success:hover {
    background: #73d13d;
}
.btn-warning {
    background: #faad14;
    color: white;
}
.btn-warning:hover {
    background: #ffc53d;
}
.btn-danger {
    background: #ff4d4f;
    color: white;
}
.btn-danger:hover {
    background: #ff7875;
}
.btn-default {
    background: #f0f0f0;
    color: #333;
}
.btn-default:hover {
    background: #e6e6e6;
}
/* 大按钮 */
.btn-lg {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}
/* 统一输入框样式 */
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}
input:focus, select:focus, textarea:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}
/* 统一卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
/* 统一头部样式 */
.page-header {
    background: linear-gradient(135deg, #1890ff, #096dd9);
    color: white;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}
.page-header .title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}
.page-header .back-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}
.page-header .back-btn:hover {
    background: rgba(255,255,255,0.1);
}
.page-header .header-actions {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}
.page-header .header-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}
.page-header .header-btn:hover {
    background: rgba(255,255,255,0.3);
}
/* 统一弹窗样式 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.modal-mask.show {
    display: flex;
}
.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.2s ease;
}
.modal-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}
.form-item {
    margin-bottom: 16px;
}
.form-item label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}
.form-item .tip {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}
.modal-btns {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.modal-btns button {
    flex: 1;
    padding: 10px;
}
/* 统一标签样式 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
    margin-bottom: 4px;
}
.tag-primary { background: #e6f7ff; color: #1890ff; }
.tag-success { background: #f6ffed; color: #52c41a; }
.tag-warning { background: #fffbe6; color: #faad14; }
.tag-danger { background: #fff2f0; color: #ff4d4f; }
.tag-purple { background: #f9f0ff; color: #722ed1; }
/* 统一宫格菜单 */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px;
}
.menu-item {
    background: white;
    border-radius: 12px;
    padding: 24px 12px;
    text-align: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}
.menu-item:active {
    transform: scale(0.96);
}
.menu-item .icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.menu-item .text {
    font-size: 15px;
    font-weight: 500;
}
.menu-item.in { background: #f6ffed; color: #52c41a; }
.menu-item.out { background: #fff2f0; color: #ff4d4f; }
.menu-item.return { background: #fffbe6; color: #faad14; }
.menu-item.stock { background: #e6f7ff; color: #1890ff; }
.menu-item.bill { background: #f9f0ff; color: #722ed1; }
.menu-item.setting { background: #f0f5ff; color: #2f54eb; }
.menu-item.user { background: #fff0f6; color: #eb2f96; }
/* 容器 */
.container {
    padding: 16px;
    padding-bottom: 30px;
}
/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
/* 复选框美化 */
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
}
.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}
/* 提示文字 */
.text-muted {
    color: #999;
    font-size: 12px;
}
.text-danger {
    color: #ff4d4f;
}
.text-success {
    color: #52c41a;
}
/*  flex 工具类 */
.flex {
    display: flex;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 自定义提示弹窗 */
.toast-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.toast-box {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 300px;
    padding: 24px 20px;
    text-align: center;
    animation: slideUp 0.2s ease;
}
.toast-content {
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.toast-btn {
    width: 100%;
    padding: 10px;
}