/* ===================== 全局基础样式 ===================== */

/* 文件位置：/www/wwwroot/4.zf1.top/common/common.css

/* 全局重置：清除默认边距、统一盒模型、去除点击高亮、统一字体 */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
    font-family: "PingFang SC", "Microsoft Yahei", "Helvetica Neue", Arial, sans-serif;
}

/* 页面基础样式：背景色、字体、底部留白（适配底部导航） */
body { 
    background: #f5f5f5; 
    font-size: 14px; 
    color: #333; 
    min-height: 100vh;
    padding: 20px;
}

/* ===================== 顶部导航栏 ===================== */
/* 顶部导航容器：固定顶部、蓝色背景、flex布局 */
.top-nav {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    height: 48px;
    background: #2196F3; 
    color: #fff; 
    display: flex; 
    align-items: center; 
    padding: 0 15px; 
    z-index: 999;
}
/* 返回按钮容器：点击区域、居中对齐 */
.back-btn-container { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
/* 导航标题：占满剩余空间、居中显示 */
.nav-title { flex: 1; text-align: center; font-size: 18px; font-weight: 600; }
/* 更多按钮（退出/编辑）：flex布局、文字+小点组合 */
.more-btn { font-size: 14px; color: #fff; cursor: pointer; display: flex; align-items: center; gap: 4px; }
/* 更多按钮的三个小点容器 */
.more-dots { display: flex; flex-direction: column; gap: 1px; }
/* 更多按钮的单个小点：圆形、白色 */
.more-dots span { width: 3px; height: 3px; border-radius: 50%; background: #fff; }

/* ===================== 内容容器 ===================== */
/* 主内容区：顶部留白（适配导航）、水平居中、最大宽度限制 */
.content { 
    padding: 60px 15px 15px; 
    max-width: 500px; 
    margin: 0 auto; 
    /* 适配登录页居中 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
}

/* ===================== 通用卡片/容器样式（复用） ===================== */
/* 数据卡片 + 登录/注册容器 通用样式 */
.data-card, .login-box, .register-box { 
    background: #fff; 
    border-radius: 8px;
    padding: 20px 15px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    margin-bottom: 15px;
    /* 登录/注册容器专属扩展 */
    width: 100%;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

/* ===================== 数据卡片（今日统计） ===================== */
/* 数据列表：横向分布 */
.data-list { display: flex; justify-content: space-between; align-items: center; }
/* 单个数据项：居中显示 */
.data-item { text-align: center; flex: 1; }
/* 数据标签（如：今日总收）：灰色、小号字体 */
.data-label { font-size: 14px; color: #666; margin-bottom: 5px; }
/* 数据值（如：金额）：蓝色、加粗、大号字体 */
.data-value { font-size: 18px; font-weight: 700; color: #2196F3; }

/* ===================== 底部导航栏 ===================== */
/* 底部导航容器：固定底部、白色背景、顶部边框、flex布局 */
.bottom-nav {
    position: fixed; 
    left: 0; 
    bottom: 0;
    width: 100%; 
    height: 50px;
    background: #fff; 
    border-top: 1px solid #eee;
    display: flex; 
    z-index: 999;
}
/* 底部导航单个项：平均分配、垂直居中、灰色文字 */
.nav-item {
    flex: 1; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    color: #666; 
    font-size: 12px; 
    text-decoration: none;
}
/* 底部导航激活项：蓝色文字 */
.nav-item.active { color: #2196F3; }
/* 底部导航图标（如：🏠 📋）：大号、底部留白 */
.nav-item-icon { font-size: 20px; margin-bottom: 3px; }

/* ===================== 费用管理页面专属样式（从老站点迁移） ===================== */
/* 页面容器 */
.page-container {
    width: 100%; 
    max-width: 500px; 
    margin: 0 auto; 
    padding: 0;
}

/* 按钮组 */
.btn-group { 
    display: flex; 
    gap: 10px; 
    margin: 15px 15px; 
    max-width: 500px;
}

/* 新增按钮 */
.add-category-btn, .add-name-btn { 
    flex: 1; 
    height: 48px; 
    line-height: 48px; 
    text-align: center; 
    border-radius: 8px; 
    color: #fff; 
    font-size: 16px; 
    text-decoration: none;
    transition: opacity 0.2s;
}
.add-category-btn { background: #FF9800; }
.add-name-btn { background: #4CAF50; }
.add-category-btn:active, .add-name-btn:active { opacity: 0.8; }

/* 类型容器 */
.type-container { 
    background: #fff; 
    border-radius: 8px; 
    padding: 15px; 
    margin: 0 15px 15px; 
    max-width: 500px;
}

/* 分类项 */
.category-item { 
    padding: 12px 0; 
    border-bottom: 1px solid #eee; 
}
.category-item:last-child { border-bottom: none; }

/* 分类头部 */
.category-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 8px; 
}

/* 分类名称 */
.category-name { 
    font-size: 16px; 
    font-weight: 600; 
    color: #333; 
}

/* 禁用状态 */
.disabled-item .category-name, 
.disabled-item .name-text { 
    color: #999 !important; 
    text-decoration: line-through; 
}

/* 禁用标签 */
.disabled-tag { 
    font-size: 11px; 
    color: #ff8f00; 
    background: #fff8e1; 
    padding: 2px 6px; 
    border-radius: 3px; 
    margin-left: 8px;
    display: inline-block;
}
.disabled-item .disabled-tag {
    background: #999;
    color: #fff;
}

/* 更多按钮容器 */
.more-wrap { text-align: center; }

/* 更多按钮 */
.more-btn { 
    padding: 6px 12px; 
    border: 1px solid #2196F3; 
    border-radius: 4px; 
    font-size: 13px; 
    cursor: pointer; 
    background: #fff; 
    color: #2196F3;
    transition: all 0.2s ease;
}
.more-btn:hover { background: #f0f7ff; }
.more-btn:active { opacity: 0.8; }
.more-btn.category { font-weight: 500; }
.more-btn.name { font-weight: normal; }

/* 名称列表 */
.name-list { margin-left: 15px; }

/* 名称项 */
.name-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 0; 
    border-bottom: 1px solid #eee; 
    width: 100%;
}
.name-item:last-child { border-bottom: none; }

/* 名称文本 */
.name-text { 
    font-size: 15px; 
    color: #666; 
    padding: 0 8px; 
}

/* 空状态 */
.empty { 
    text-align: center; 
    padding: 20px 0; 
    color: #999; 
    font-size: 14px; 
}

/* 隐藏数据 */
.type-data { display: none; }

/* ===================== 弹窗样式 ===================== */
/* 弹窗遮罩层 */
.detail-modal, .modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0,0,0,0.5); 
    z-index: 1000; 
    align-items: center; 
    justify-content: center;
    padding: 20px;
}

/* 确认弹窗 */
.confirm-modal {
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0,0,0,0.5); 
    z-index: 1000; 
    align-items: center; 
    justify-content: center;
    padding: 0;
}

/* 详情弹窗内容 */
.detail-content { 
    background: #fff; 
    border-radius: 12px; 
    padding: 25px; 
    width: 100%; 
    max-width: 380px;
}

/* 弹窗标题 */
.detail-title { 
    font-size: 18px; 
    font-weight: 600; 
    text-align: center; 
    margin-bottom: 20px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #eee;
    color: #333;
}

/* 弹窗信息区 */
.detail-info { 
    margin-bottom: 25px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    background: #f5f5f5; 
    padding: 15px; 
    border-radius: 8px;
}

/* 信息行 */
.info-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 0 5px; 
    font-size: 15px; 
}

/* 信息标签 */
.info-label { color: #666; }
.info-value { color: #333; font-weight: 500; }

/* 操作按钮组 */
.detail-opt { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 15px; 
}

/* 操作按钮 */
.opt-btn { 
    padding: 10px 0; 
    border: none; 
    border-radius: 4px; 
    font-size: 14px; 
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.opt-btn.normal { background: #2196F3; color: #fff; }
.opt-btn.normal.edit { background: #4CAF50; color: #fff; }
.opt-btn.normal.delete { background: #f44336; color: #fff; }
.opt-btn.normal.disable { background: #FF9800; color: #fff; }
.opt-btn.normal.enable { background: #8BC34A; color: #fff; }
.opt-btn.disabled { 
    background: #eee; 
    color: #999; 
    cursor: not-allowed; 
    opacity: 0.6;
}

/* 关闭按钮 */
.close-btn { 
    width: 100%; 
    padding: 10px 0; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-size: 14px; 
    cursor: pointer; 
    background: #fff; 
    color: #666;
    transition: background 0.2s;
}
.close-btn:hover { background: #f5f5f5; }

/* 新增/编辑弹窗内容 */
.modal-content { 
    background: #fff; 
    border-radius: 12px; 
    padding: 25px; 
    width: 100%; 
    max-width: 400px;
}

/* 弹窗标题 */
.modal-title { 
    font-size: 18px; 
    font-weight: 600; 
    margin-bottom: 20px; 
    color: #333; 
    text-align: center;
}

/* 弹窗输入框 */
.modal-input { 
    width: 100%; 
    padding: 12px 15px; 
    border: 1px solid #e5e5e5; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    font-size: 15px;
}
.modal-input:focus { border-color: #2196F3; outline: none; }

/* 弹窗按钮组 */
.modal-btns { 
    display: flex; 
    gap: 10px; 
    justify-content: flex-end; 
}

/* 弹窗按钮 */
.modal-btn { 
    padding: 10px 20px; 
    border: none; 
    border-radius: 6px; 
    font-size: 15px; 
    cursor: pointer;
}
.modal-btn-confirm { background: #2196F3; color: #fff; }
.modal-btn-cancel { background: #f5f5f5; color: #666; }
.modal-btn:active { opacity: 0.8; }

/* 统一确认弹窗内容 */
.confirm-content { 
    background: #fff; 
    border-radius: 12px; 
    padding: 25px 20px; 
    width: 85%; 
    max-width: 320px; 
    text-align: center;
}

/* 确认文本 */
.confirm-text { 
    font-size: 16px; 
    color: #333; 
    line-height: 1.4; 
    margin-bottom: 22px; 
    font-weight: 400;
}

/* 确认按钮组 */
.confirm-btns { 
    display: flex; 
    gap: 10px; 
    padding: 0 5px; 
    justify-content: center;
}
.confirm-btns button { 
    flex: 1; 
    padding: 10px 0; 
    border-radius: 6px; 
    font-size: 15px;
    cursor: pointer; 
    border: none; 
    height: 42px; 
    line-height: 1;
}
.confirm-yes { background: #2196F3; color: #fff; font-weight: 400; }
.confirm-no { background: #f5f5f5; color: #333; font-weight: 400; }
.confirm-btns.single-btn { gap: 0; }
.confirm-btns.single-btn button { min-width: 120px; }

/* 按钮点击效果 */
button:active { opacity: 0.8; }

/* ===================== 通用按钮样式（复用） ===================== */
/* 弹窗按钮 + 登录按钮 + 验证码按钮 通用样式 */
.detail-modal .btn, .code-btn, .btn {
    padding: 8px 20px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    background: #fff; 
    color: #666; 
    cursor: pointer; 
    font-size: 14px;
    transition: background 0.2s;
}
/* 主按钮样式（登录按钮/弹窗确认按钮） */
.detail-modal .confirm-btn, .btn {
    border: none; 
    background: #2196F3; 
    color: #fff;
    /* 登录按钮扩展 */
    width: 100%; 
    padding: 14px; 
    border-radius: 8px; 
    font-size: 16px;
}
/* 按钮hover效果 */
.btn:hover, .code-btn:hover {
    background: #1976D2;
}
/* 禁用按钮样式 */
.code-btn.disabled, .pagination-btn.disabled {
    background: #ccc; 
    cursor: not-allowed; 
    color: #999;
}

/* ===================== 通用输入框样式（增强版） ===================== */
/* 登录/注册页面的输入框 - 增强权重确保生效 */
.login-box .input-group input,
.register-box .input-group input,
.input-group input {
    width: 100%; 
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

/* 输入框聚焦样式 - 增强权重 */
.login-box .input-group input:focus,
.register-box .input-group input:focus,
.input-group input:focus {
    border-color: #2196F3; 
    outline: none; 
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* 弹窗输入框保持原有样式（不受影响） */
.detail-modal input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ===================== 通用提示文本样式（复用） ===================== */
/* 弹窗错误提示 + 登录提示文本 通用样式 */
.detail-modal .error-text, .tips, .tips-red {
    color: #E53935; 
    font-size: 12px; 
    margin-top: 5px; 
    min-height: 16px;
    /* 提示文本扩展 */
    text-align: center;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}
/* 普通提示文本（非红色） */
.tips {
    color: #666;
}
/* 红色提示文本 */
.tips-red {
    color: #ff4444; 
    font-weight: bold;
}
/* 登录错误/成功提示框 */
.err, .success {
    text-align: center; 
    margin: 0 0 20px 0; 
    padding: 12px; 
    border-radius: 8px; 
    font-size: 14px;
}
.err {
    color: #dc3545; 
    background: #f8d7da;
}
.success {
    color: #28a745; 
    background: #d4edda;
}

/* ===================== 核心新增：客户搜索下拉框样式 ===================== */
/* 搜索输入框容器：相对定位、全宽、边距 */
.search-box {
    position: relative; 
    width: 100%; 
    margin: 10px 0;
}
/* 搜索输入框：全宽、边框、圆角、内边距 */
.search-input {
    width: 100%; 
    padding: 10px 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    font-size: 14px; 
    box-sizing: border-box;
}
/* 下拉建议列表：绝对定位、全宽、白色背景、边框、圆角、阴影、高优先级 */
.search-dropdown {
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 4px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    z-index: 999; 
    max-height: 200px; 
    overflow-y: auto; 
    display: none;
}
/* 下拉列表项：内边距、鼠标悬浮高亮 */
.search-dropdown-item {
    padding: 10px 15px; 
    cursor: pointer; 
    font-size: 14px; 
    border-bottom: 1px solid #f0f0f0;
}
/* 下拉列表项悬浮样式：浅灰背景 */
.search-dropdown-item:hover {
    background: #f8f8f8;
}
/* 下拉列表最后一项：去除底部边框 */
.search-dropdown-item:last-child {
    border-bottom: none;
}

/* ===================== 核心新增：分页页码样式 ===================== */
/* 分页容器：居中、边距、flex布局 */
.pagination {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin: 20px 0; 
    gap: 10px; 
    font-size: 14px;
}
/* 分页按钮：内边距、边框、圆角、鼠标指针 */
.pagination-btn {
    padding: 8px 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    color: #333; 
    text-decoration: none; 
    cursor: pointer;
}
/* 分页信息文字：灰色、边距 */
.pagination-info {
    color: #666; 
    margin: 0 10px;
}

/* ===================== 表格操作按钮样式 ===================== */
/* 操作按钮容器：相对定位 */
.opt-btn-wrap {
    position: relative; 
    display: inline-block;
}
/* 操作按钮：蓝色背景、白色文字、圆角、内边距 */
.opt-btn {
    padding: 5px 10px; 
    border: none; 
    border-radius: 4px; 
    background: #2196F3; 
    color: #fff; 
    cursor: pointer; 
    font-size: 14px;
}
/* 操作菜单：绝对定位、白色背景、边框、阴影、圆角、默认隐藏 */
.operate-menu {
    position: absolute; 
    top: 100%; 
    right: 0; 
    background: #fff; 
    border: 1px solid #eee; 
    border-radius: 4px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
    z-index: 99; 
    display: none; 
    min-width: 100px;
}
/* 操作菜单项：内边距、鼠标悬浮高亮 */
.operate-item {
    padding: 8px 15px; 
    cursor: pointer; 
    font-size: 14px; 
    border-bottom: 1px solid #f0f0f0;
}
/* 操作菜单项悬浮样式：浅蓝背景 */
.operate-item:hover {
    background: #e3f2fd;
}
/* 操作菜单最后一项：去除底部边框 */
.operate-item:last-child {
    border-bottom: none;
}

/* 输入框组 */
.input-group { 
    margin-bottom: 20px; 
    position: relative; 
}
.input-group label { 
    display: block; 
    margin-bottom: 8px; 
    color: #555; 
    font-size: 15px;
}
/* 验证码按钮定位 */
.code-btn { 
    position: absolute; 
    right: 10px; 
    top: 40px; 
}

/* 登录/注册链接 */
.login-link, .register-link { 
    text-align: center; 
    margin-top: 25px; 
    font-size: 14px; 
    color: #666;
}
.login-link a, .register-link a { 
    color: #2196F3; 
    text-decoration: none; 
    margin-left: 4px;
}
.login-link a:hover, .register-link a:hover { 
    text-decoration: underline; 
}