* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }

/* ===== 登录页 ===== */
.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a6fff, #4096FF); padding: 20px; }
.login-box { background: #fff; padding: 40px 30px; border-radius: 12px; width: 100%; max-width: 420px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.login-title { font-size: 24px; color: #1677FF; text-align: center; margin-bottom: 8px; }
.login-subtitle { color: #999; text-align: center; margin-bottom: 30px; font-size: 13px; }
.login-tip { color: #bbb; font-size: 12px; text-align: center; margin-top: 16px; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #555; font-size: 13px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 12px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 14px;
    outline: none; transition: border-color 0.2s; background: #fff;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: #1677FF; box-shadow: 0 0 0 2px rgba(22,119,255,0.1); }
.form-group textarea { resize: vertical; font-family: inherit; }
.form-group.half { flex: 1; min-width: 0; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-tip { color: #999; font-size: 12px; margin: 8px 0 16px; }
.required { color: #f56c6c; }
.optional { color: #909399; font-size: 11px; background: #f0f2f5; padding: 1px 6px; border-radius: 3px; }
.input-group { display: flex; gap: 0; align-items: stretch; }
.input-group input, .input-group select { border-radius: 0; }
.input-group input:first-child { border-radius: 6px 0 0 6px; }
.input-group select:last-child { border-radius: 0 6px 6px 0; border-left: none; }
.input-sep { display: flex; align-items: center; padding: 0 10px; color: #909399; font-size: 13px; background: #fafafa; border-top: 1px solid #dcdfe6; border-bottom: 1px solid #dcdfe6; white-space: nowrap; }

/* ===== 薪资单位按钮组（时/天/月）===== */
.salary-unit-group { display: inline-flex; overflow: hidden; border: 1px solid #dcdfe6; border-left: none; border-radius: 0 6px 6px 0; background: #fff; }
.salary-unit-group .unit-btn { border: none; background: #fff; padding: 10px 16px; cursor: pointer; font-size: 14px; color: #555; transition: all .15s; }
.salary-unit-group .unit-btn + .unit-btn { border-left: 1px solid #dcdfe6; }
.salary-unit-group .unit-btn.active { background: linear-gradient(135deg, #FF6B00, #FF8C00); color: #fff; font-weight: 600; }

/* ===== 按钮 ===== */
.btn { padding: 8px 18px; border: 1px solid #dcdfe6; background: #fff; border-radius: 6px; cursor: pointer; font-size: 13px; transition: all 0.2s; display: inline-block; }
.btn:hover { border-color: #1677FF; color: #1677FF; }
.btn-primary { background: #1677FF; color: #fff; border-color: #1677FF; }
.btn-primary:hover { background: #4096FF; border-color: #4096FF; color: #fff; }
.btn-danger { background: #f56c6c; color: #fff; border-color: #f56c6c; }
.btn-danger:hover { background: #f89898; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; margin-top: 10px; }

/* ===== 头部 ===== */
.header { height: 56px; background: #fff; border-bottom: 1px solid #ebeef5; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.header h2 { font-size: 16px; color: #303133; }
.header-right { display: flex; align-items: center; gap: 12px; }
#adminInfo { color: #606266; font-size: 13px; }

/* ===== 主容器 ===== */
.main-container { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 220px; background: #fff; border-right: 1px solid #ebeef5; padding: 12px 0; flex-shrink: 0; overflow-y: auto; }
.menu-section-title { padding: 16px 20px 6px; font-size: 12px; color: #909399; font-weight: 700; letter-spacing: 1px; border-top: 1px solid #f0f2f5; }
.menu-section-title:first-child { border-top: none; }
.menu { list-style: none; padding-bottom: 4px; }
.menu-item { padding: 11px 20px; cursor: pointer; color: #606266; transition: all 0.2s; border-left: 3px solid transparent; font-size: 13px; }
.menu-item:hover { background: #f5f7fa; color: #1677FF; }
.menu-item.active { background: #ecf5ff; color: #1677FF; border-left-color: #1677FF; font-weight: 500; }

.content { flex: 1; padding: 24px; overflow: auto; }
.page { display: none; }
.page.active { display: block; }
.page h2 { font-size: 18px; margin-bottom: 20px; color: #303133; display: flex; justify-content: space-between; align-items: center; }

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.card h3 { font-size: 15px; color: #303133; }

/* ===== 数据卡片 ===== */
.stats-grid { display: grid; gap: 16px; }
.stats-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.stats-grid.four-col { grid-template-columns: repeat(4, 1fr); }
.stats-grid.two-col { grid-template-columns: repeat(2, 1fr); }
.stat-card { background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); text-align: center; transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.stat-card.sm { padding: 18px 12px; }
.stat-card.clickable { cursor: pointer; position: relative; }
.stat-card.clickable::after { content: '查看明细 ›'; position: absolute; right: 12px; bottom: 8px; font-size: 12px; color: #1677FF; opacity: 0; transition: opacity 0.2s; }
.stat-card.clickable:hover::after { opacity: 1; }
.stat-label { color: #909399; font-size: 13px; margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: 700; }
.stat-value.blue { color: #1677FF; }
.stat-value.green { color: #52c41a; }
.stat-value.red { color: #f56c6c; }
.stat-value.gold { color: #fa8c16; }
.stat-value.gray { color: #8c8c8c; }
.stat-value-sm { font-size: 24px; font-weight: 700; }
.stat-value-sm.blue { color: #1677FF; }
.stat-value-sm.green { color: #52c41a; }
.stat-value-sm.gold { color: #fa8c16; }
.stat-value-sm.gray { color: #8c8c8c; }

/* ===== 表格 ===== */
.table { width: 100%; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.04); border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #ebeef5; font-size: 13px; }
.table th { background: #fafafa; color: #606266; font-weight: 500; white-space: nowrap; }
.table tr:hover { background: #f5f7fa; }
.table .btn { margin-right: 4px; }
.table .btn:last-child { margin-right: 0; }

/* 子管理员列表专用表格：更宽松的行高与间距 */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid #ebeef5; vertical-align: middle; }
.data-table th { background: #fafafa; color: #606266; font-weight: 500; white-space: nowrap; }
.data-table tbody tr:hover { background: #f5f7fa; }
.data-table .status-tag { padding: 4px 10px; font-size: 13px; }
.data-table .btn { margin-right: 6px; }
.data-table .btn:last-child { margin-right: 0; }
.data-table td .perm-label { display: inline-block; padding: 3px 8px; margin: 2px 4px 2px 0; background: #f0f2f5; border-radius: 4px; font-size: 12px; color: #606266; }

/* ===== 状态标签 ===== */
.status-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.status-tag.s-0 { background: #fef0f0; color: #f56c6c; }
.status-tag.s-1 { background: #f0f9eb; color: #67c23a; }
.status-tag.s-2 { background: #fdf6ec; color: #e6a23c; }

/* ===== 岗位类型标签 ===== */
.type-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.type-badge.premium { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.type-badge.normal { background: #f0f2f5; color: #8c8c8c; border: 1px solid #dcdfe6; }

/* ===== 类型切换按钮 ===== */
.type-toggle { display: flex; gap: 0; }
.type-btn { padding: 10px 24px; border: 1px solid #dcdfe6; background: #fff; cursor: pointer; font-size: 14px; transition: all 0.2s; }
.type-btn:first-child { border-radius: 6px 0 0 6px; }
.type-btn:last-child { border-radius: 0 6px 6px 0; border-left: none; }
.type-btn.active { background: #1677FF; color: #fff; border-color: #1677FF; }

/* ===== 筛选栏 ===== */
.filter-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-bar select, .filter-bar input { padding: 7px 12px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; outline: none; }
.filter-bar select:focus, .filter-bar input:focus { border-color: #1677FF; }
.tab-bar { border-bottom: 1px solid #ebeef5; padding-bottom: 12px; margin-bottom: 20px; }

/* ===== 弹窗 ===== */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-content { background: #fff; border-radius: 10px; padding: 24px; width: 90%; max-width: 520px; max-height: 80vh; overflow-y: auto; box-shadow: 0 12px 48px rgba(0,0,0,0.15); }
.modal-content h3 { margin-bottom: 16px; color: #303133; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ===== Toast ===== */
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); padding: 10px 24px; border-radius: 6px; color: #fff; font-size: 14px; z-index: 9999; animation: toastIn 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.toast-info { background: #1677FF; }
.toast-success { background: #52c41a; }
.toast-error { background: #f56c6c; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ===== 分割线标题 ===== */
.section-divider { font-size: 14px; font-weight: 600; color: #303133; margin: 24px 0 16px; padding-bottom: 8px; border-bottom: 1px solid #ebeef5; }

/* ===== 柱状图 ===== */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 260px; padding: 8px 0; justify-content: center; }
.bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; max-width: 80px; height: 100%; justify-content: flex-end; }
.bar-value { font-size: 11px; color: #606266; margin-bottom: 4px; white-space: nowrap; }
.bar { width: 40px; background: linear-gradient(180deg, #4096FF, #1677FF); border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.4s ease; }
.bar-label { font-size: 11px; color: #909399; margin-top: 6px; text-align: center; word-break: break-all; }
.chart-container { min-height: 260px; }

/* ===== 退订原因 ===== */
.reason-item { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 250px; }
.reason-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.reason-dot.dot-blue { background: #4096FF; }
.reason-dot.dot-red { background: #f56c6c; }
.reason-bar-wrap { flex: 1; height: 8px; background: #f0f2f5; border-radius: 4px; overflow: hidden; }
.reason-bar { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.reason-count { color: #909399; font-size: 13px; white-space: nowrap; }

/* ===== 预览图 ===== */
.preview-img { max-width: 150px; max-height: 100px; margin-top: 8px; border-radius: 4px; border: 1px solid #ebeef5; object-fit: cover; }

/* ===== 商家详情卡片 ===== */
.merchant-detail-card { border: 1px solid #ebeef5; border-radius: 8px; padding: 16px; margin-bottom: 12px; background: #fafafa; }
.merchant-detail-card .md-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.merchant-detail-card .md-header h4 { font-size: 15px; color: #303133; }
.merchant-detail-card .md-body { display: flex; gap: 24px; }
.merchant-detail-card .md-info { flex: 1; }
.merchant-detail-card .md-row { display: flex; gap: 12px; padding: 4px 0; font-size: 13px; }
.merchant-detail-card .md-label { color: #909399; min-width: 60px; }
.merchant-detail-card .md-images { display: flex; gap: 12px; align-items: flex-start; }
.merchant-detail-card .md-img-wrap { text-align: center; }
.merchant-detail-card .md-img-wrap span { display: block; font-size: 11px; color: #909399; margin-bottom: 4px; }
.merchant-detail-card .md-img-wrap img { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; border: 1px solid #ebeef5; }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 40px 20px; color: #909399; font-size: 15px; }

/* ===== 地图选点 ===== */
.map-picker { margin-top: 8px; border: 1px solid #dcdfe6; border-radius: 6px; overflow: hidden; }
.map-picker-footer { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fafafa; border-top: 1px solid #ebeef5; }
.map-picker-footer span { flex: 1; font-size: 13px; }

/* ===== 链接 ===== */
.link { color: #1677FF; text-decoration: none; margin-right: 6px; font-size: 12px; }
.link:hover { text-decoration: underline; }

/* ===== 商家后台上下双栏布局 ===== */
.merchant-panel-grid { display: flex; flex-direction: column; gap: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid #ebeef5; background: #fafbfc; border-radius: 8px 8px 0 0; }
.card-header h3 { margin: 0; font-size: 15px; font-weight: 600; color: #303133; }

/* ===== 开关 ===== */
.switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #dcdfe6; transition: .3s; border-radius: 26px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
input:checked + .slider { background-color: #1677FF; }
input:checked + .slider:before { transform: translateX(22px); }
input:disabled + .slider { opacity: 0.6; cursor: not-allowed; }

/* ===== 状态标签 ===== */
.status-badge { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; }
.status-on { background: #e6f7ff; color: #1677FF; border: 1px solid #91d5ff; }
.status-off { background: #f5f5f5; color: #8c8c8c; border: 1px solid #d9d9d9; }

/* ===== 带单位输入框 ===== */
.input-with-unit { position: relative; display: flex; align-items: center; }
.input-with-unit input { padding-right: 40px; }
.input-with-unit .unit { position: absolute; right: 12px; color: #909399; font-size: 13px; pointer-events: none; }
.input-with-unit input:disabled { background: #f5f7fa; color: #909399; }

/* ===== 规则列表 ===== */
.rule-list { display: flex; flex-direction: column; gap: 16px; }
.rule-item { display: flex; gap: 12px; align-items: flex-start; }
.rule-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.rule-dot.blue { background: #1677FF; }
.rule-dot.orange { background: #fa8c16; }
.rule-dot.red { background: #f56c6c; }
.rule-item strong { display: block; font-size: 14px; color: #303133; margin-bottom: 4px; }
.rule-item p { color: #666; font-size: 13px; line-height: 1.6; margin: 0; }

/* ===== 设置页 ===== */
.settings-layout { max-width: 720px; }
.ban-config-card { padding: 0; }
.ban-config-card .card-header { display: flex; justify-content: space-between; align-items: center; }
.ban-config-card .card-body { padding: 20px; }
.card-subtitle { font-size: 13px; color: #909399; margin-top: 4px; }
.form-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid #f0f0f0; }
.align-center { align-items: center; }

/* ===== 菜单折叠 ===== */
.menu-group { list-style: none; padding: 0; margin: 0; }
.menu-group-title { padding: 16px 20px 6px; font-size: 12px; color: #909399; font-weight: 700; letter-spacing: 1px; border-top: 1px solid #f0f2f5; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.menu-group:first-child .menu-group-title { border-top: none; }
.menu-group-title:hover { color: #409eff; }
.menu-group-title .arrow { font-size: 12px; transition: transform .2s; }
.menu-group-title.collapsed .arrow { transform: rotate(-90deg); }
.collapsible-content { max-height: 500px; overflow: hidden; transition: max-height .25s ease; }
.collapsible-content.collapsed { max-height: 0; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .sidebar { width: 160px; }
    .stats-grid.three-col, .stats-grid.four-col { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; }
    .content { padding: 16px; }
    .merchant-detail-card .md-body { flex-direction: column; }
    .merchant-panel-grid { grid-template-columns: 1fr; }
}

/* ===== 岗位详情弹窗 ===== */
.job-detail-modal { max-height: 75vh; overflow-y: auto; padding-right: 4px; }
.job-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
.job-detail-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; background: #f8fafc; border-radius: 6px; min-width: 0; }
.job-detail-label { flex-shrink: 0; color: #909399; font-size: 13px; min-width: 70px; }
.job-detail-value { color: #303133; font-size: 13px; word-break: break-all; flex: 1; }
.job-detail-text { padding: 12px 14px; background: #f8fafc; border-radius: 6px; color: #303133; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow-y: auto; border-left: 3px solid #e6a23c; }
@media (max-width: 768px) {
    .job-detail-grid { grid-template-columns: 1fr; }
}
