Files
JayuCloud/JC-Salon-Frontend/src/views/admin/SystemSettingsView.vue
T

478 lines
28 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div class="system-settings">
<header class="settings-header">
<div>
<span class="settings-eyebrow">SALON ADMIN</span>
<h1>系统设置</h1>
<p>集中管理后台运行参数、服务接入和当前账号。</p>
</div>
<span class="settings-health"><i />配置服务正常</span>
</header>
<div class="settings-layout">
<nav class="settings-nav" aria-label="系统设置分类">
<span class="settings-nav__label">设置目录</span>
<button
v-for="item in sections"
:key="item.key"
type="button"
:aria-pressed="activeSection === item.key"
:class="['settings-nav__item', { 'is-active': activeSection === item.key }]"
@click="activeSection = item.key"
>
<span class="settings-nav__icon"><component :is="item.icon" /></span>
<span>{{ item.label }}</span>
</button>
<p class="settings-nav__hint">复杂业务继续在独立页面管理,这里只保留影响后台运行的设置。</p>
</nav>
<main class="settings-pane" :aria-busy="loading">
<section v-if="activeSection === 'runtime'" class="settings-section-panel">
<div class="pane-head">
<div>
<h2>运行参数</h2>
<p>控制账号创建和店长登录后的默认行为。</p>
</div>
<span />
</div>
<div class="setting-group">
<div class="setting-group__head setting-group__head--with-action"><strong>账号默认值</strong><span>USER</span><a-button size="small" type="primary" :loading="savingDefaultPassword" @click="saveDefaultPassword">保存密码设置</a-button></div>
<div class="setting-row setting-row--last">
<div class="setting-copy">
<strong>后台新增用户默认密码</strong>
<span>新增或重置店长账号时使用,不影响已有账号。</span>
</div>
<div class="setting-control setting-control--password">
<a-input-password v-model:value="defaultPasswordForm.configValue" autocomplete="new-password" placeholder="请输入 8-32 位强密码" />
<span class="control-note">{{ defaultPasswordForm.configValue ? '已填写' : '未设置' }}</span>
<a-switch v-model:checked="defaultPasswordEnabled" checked-children="启用" un-checked-children="停用" />
</div>
<span :class="['status-pill', { 'is-muted': !defaultPasswordEnabled }]">{{ defaultPasswordEnabled ? '启用' : '停用' }}</span>
</div>
</div>
<div class="setting-group">
<div class="setting-group__head setting-group__head--with-action"><strong>店长登录提醒</strong><span>WORKBENCH</span><a-button size="small" type="primary" :loading="savingReviewNotice" @click="saveReviewNotice">保存提醒设置</a-button></div>
<div class="setting-row setting-row--last">
<div class="setting-copy">
<strong>店长员工审核提醒</strong>
<span>店长登录小程序时提醒处理待审核员工申请。</span>
</div>
<div class="setting-control">
<a-switch v-model:checked="reviewNoticeEnabled" checked-children="显示" un-checked-children="隐藏" />
<span class="control-note">登录时{{ reviewNoticeEnabled ? '显示' : '不显示' }}</span>
</div>
<span :class="['status-pill', { 'is-muted': !reviewNoticeEnabled }]">{{ reviewNoticeEnabled ? '启用' : '停用' }}</span>
</div>
</div>
<div class="setting-group">
<div class="setting-group__head setting-group__head--with-action"><strong>店长注册审核</strong><span>WORKBENCH</span><a-button size="small" type="primary" :loading="savingManagerReviewMode" @click="saveManagerReviewMode">保存审核模式</a-button></div>
<div class="setting-row setting-row--last">
<div class="setting-copy">
<strong>内容审核通过后自动批准</strong>
<span>开启后仅在店长申请绑定的门店资料内容审核通过时自动通过;关闭后由管理员人工复核。</span>
</div>
<div class="setting-control">
<a-switch v-model:checked="managerAutoApproveEnabled" checked-children="自动" un-checked-children="人工" />
<span class="control-note">{{ managerAutoApproveEnabled ? '自动批准' : '人工复核' }}</span>
</div>
<span :class="['status-pill', { 'is-muted': !managerAutoApproveEnabled }]">{{ managerAutoApproveEnabled ? '自动审核' : '人工审核' }}</span>
</div>
</div>
<div class="setting-group">
<div class="setting-group__head setting-group__head--with-action"><strong>门店经营有效期</strong><span>SHOP</span><a-button size="small" type="primary" :loading="savingShopValidity" @click="saveShopValidity">保存有效期</a-button></div>
<div class="setting-row setting-row--last">
<div class="setting-copy">
<strong>新门店默认有效期</strong>
<span>店长注册审核通过当天计为第 1 天;单个门店可在门店管理中单独调整到期日。</span>
</div>
<div class="setting-control setting-control--number">
<a-input v-model:value="shopDefaultValidDays" type="number" :min="1" :max="3650" addon-after="天" />
</div>
<span class="control-note">1–3650 天</span>
</div>
</div>
<p class="section-footnote">默认密码仍按后台账号接口校验;员工审核入口和数量角标不受登录提醒开关影响。门店到期只限制新增普通预约。</p>
</section>
<section v-else-if="activeSection === 'services'" class="settings-section-panel">
<div class="pane-head">
<div>
<h2>服务接入</h2>
<p>维护后台地图选点和短信验证码使用的服务渠道。</p>
</div>
<span />
</div>
<div class="setting-group">
<div class="setting-group__head setting-group__head--with-action"><strong>地图服务</strong><span>MAP</span><a-button size="small" type="primary" :loading="savingMap" @click="saveMapConfig">保存地图设置</a-button></div>
<div class="setting-row">
<div class="setting-copy"><strong>默认地图渠道</strong><span>店铺选点和后台地图展示使用的默认渠道。</span></div>
<div class="setting-control"><a-select v-model:value="mapForms.provider.configValue" :options="mapProviderOptions" /></div>
<span class="status-pill">{{ mapEnabled ? '已配置' : '停用' }}</span>
</div>
<div v-for="item in mapKeyRows" :key="item.key" class="setting-row">
<div class="setting-copy">
<strong>
{{ item.label }}
<a
class="setting-copy__link"
:href="item.url"
target="_blank"
rel="noopener noreferrer"
:aria-label="`前往${item.label}获取页面`"
>
获取 Key
<ExportOutlined />
</a>
</strong>
<span>{{ item.description }}</span>
</div>
<div class="setting-control setting-control--password"><a-input-password v-model:value="mapForms[item.key].configValue" :placeholder="item.placeholder" /></div>
<span class="status-pill" :class="{ 'is-muted': !mapForms[item.key].configValue }">{{ mapForms[item.key].configValue ? '已填写' : '待配置' }}</span>
</div>
<div class="setting-row setting-row--last">
<div class="setting-copy"><strong>地图服务状态</strong><span>停用后店铺地图选点不会调用已保存的渠道。</span></div>
<div class="setting-control"><a-switch v-model:checked="mapEnabled" checked-children="启用" un-checked-children="停用" /></div>
<span :class="['status-pill', { 'is-muted': !mapEnabled }]">{{ mapEnabled ? '启用' : '停用' }}</span>
</div>
</div>
<div class="setting-group">
<div class="setting-group__head setting-group__head--with-action"><strong>短信服务</strong><span>SMS</span><a-button size="small" type="primary" :loading="savingSmsProvider" @click="saveSmsProvider">保存短信设置</a-button></div>
<div class="setting-row setting-row--last">
<div class="setting-copy"><strong>短信供应商</strong><span>统一控制登录、绑定和找回密码的验证码通道。</span></div>
<div class="setting-control"><a-select v-model:value="smsProviderForm.configValue" :options="smsProviderOptions" /></div>
<span class="warning-note">切换会影响全部验证码</span>
</div>
</div>
</section>
<section v-else class="settings-section-panel">
<div class="pane-head">
<div>
<h2>管理员账号</h2>
<p>查看后台登录账号与当前会话状态。</p>
</div>
<span class="account-status"><i />会话正常</span>
</div>
<div class="setting-group">
<div class="setting-group__head"><strong>账号信息</strong><span>ACCOUNT</span></div>
<div class="setting-row">
<div class="setting-copy"><strong>登录账号</strong><span>用于进入后台的账号标识。</span></div>
<div class="setting-value">{{ userInfo?.account || '--' }}</div>
<span class="status-pill">当前账号</span>
</div>
<div class="setting-row">
<div class="setting-copy"><strong>显示昵称</strong><span>后台顶部和操作记录中使用的昵称。</span></div>
<div class="setting-value">{{ userInfo?.nickname || '未设置昵称' }}</div>
<span class="control-note">只读</span>
</div>
<div class="setting-row setting-row--last">
<div class="setting-copy"><strong>后台会话</strong><span>后台请求使用管理员身份校验,退出登录后当前会话立即失效。</span></div>
<div class="setting-value">{{ userInfo?.id ? '已登录' : '状态未知' }}</div>
<span class="status-pill" :class="{ 'is-muted': !userInfo?.id }">{{ userInfo?.id ? '正常' : '待验证' }}</span>
</div>
</div>
</section>
</main>
</div>
</div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref } from 'vue'
import { useRoute } from 'vue-router'
import { message } from 'ant-design-vue'
import { ApiOutlined, ExportOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons-vue'
import { adminSystemParameterConfigApi, type SystemParameterConfigVO } from '@/api/admin'
import { loadCachedAdminUserInfo } from '@/utils/admin-session'
type SettingsSection = 'runtime' | 'services' | 'account'
type MapKey = 'tencentWeb' | 'amapWeb' | 'amapMini'
const route = useRoute()
const activeSection = ref<SettingsSection>(route.query.section === 'account' ? 'account' : 'runtime')
const loading = ref(false)
const savingDefaultPassword = ref(false)
const savingReviewNotice = ref(false)
const savingManagerReviewMode = ref(false)
const savingShopValidity = ref(false)
const savingMap = ref(false)
const savingSmsProvider = ref(false)
const defaultPasswordEnabled = ref(true)
const reviewNoticeEnabled = ref(true)
const managerAutoApproveEnabled = ref(false)
const shopDefaultValidDays = ref('30')
const mapEnabled = ref(true)
const smsProviderOptions = [
{ label: 'Spug 短信', value: 'SPUG' },
{ label: '阿里云短信认证服务', value: 'ALIYUN_SMS_VERIFY' }
]
const mapProviderOptions = [
{ label: '腾讯地图', value: 'TENCENT' },
{ label: '高德地图', value: 'AMAP' }
]
const sections = [
{ key: 'runtime' as const, label: '运行参数', icon: SettingOutlined },
{ key: 'services' as const, label: '服务接入', icon: ApiOutlined },
{ key: 'account' as const, label: '当前账号', icon: UserOutlined }
]
const mapKeyRows: Array<{ key: MapKey; label: string; description: string; placeholder: string; url: string }> = [
{ key: 'tencentWeb', label: '腾讯 Web Key', description: '用于后台腾讯地图选点和 Web 展示。', placeholder: '填写腾讯 Web Key', url: 'https://lbs.qq.com/dev/console/key/manage' },
{ key: 'amapWeb', label: '高德 Web Key', description: '用于后台高德地图选点和 Web 展示。', placeholder: '填写高德 Web Key', url: 'https://console.amap.com/dev/key/app' },
{ key: 'amapMini', label: '高德小程序 Key', description: '供 Salon 小程序后续地图能力使用。', placeholder: '填写高德小程序 Key', url: 'https://console.amap.com/dev/key/app' }
]
const defaultPasswordForm = reactive<SystemParameterConfigVO>({
configGroup: 'USER', configKey: 'DEFAULT_PASSWORD', configName: '后台新增用户默认密码', configValue: 'Fingertip@123', enabled: 1,
remark: '后台新增用户不填写密码时使用;需满足 8-32 位且至少包含数字、小写字母、大写字母、特殊符号中的 3 类'
})
const reviewNoticeForm = reactive<SystemParameterConfigVO>({
configGroup: 'WORKBENCH', configKey: 'MANAGER_REGISTRATION_REVIEW_NOTICE', configName: '店长员工审核提醒', configValue: 'true', enabled: 1,
remark: '控制店长登录小程序后是否显式提示当前门店的待审核员工申请'
})
const managerReviewModeForm = reactive<SystemParameterConfigVO>({
configGroup: 'WORKBENCH', configKey: 'MANAGER_REGISTRATION_AUTO_APPROVE', configName: '店长注册自动审核', configValue: 'false', enabled: 1,
remark: '开启后仅在店长申请关联的门店资料内容审核通过时自动批准;关闭后由管理员人工复核'
})
const shopValidityForm = reactive<SystemParameterConfigVO>({
configGroup: 'SHOP', configKey: 'SHOP_DEFAULT_VALID_DAYS', configName: '新门店默认有效期天数', configValue: '30', enabled: 1,
remark: '店长注册审核通过后新门店的默认经营有效期天数,范围1-3650'
})
const smsProviderForm = reactive<SystemParameterConfigVO>({
configGroup: 'SMS', configKey: 'SMS_PROVIDER', configName: '短信供应商', configValue: 'SPUG', enabled: 1,
remark: '全局切换短信供应商时同步验证码模板和 MessageHub 通道'
})
const mapForms = reactive<Record<MapKey | 'provider', SystemParameterConfigVO>>({
provider: { configGroup: 'MAP', configKey: 'MAP_PROVIDER', configName: '当前地图渠道', configValue: 'TENCENT', enabled: 1, remark: 'TENCENT 或 AMAP;决定后台店铺选点默认使用哪个地图渠道' },
tencentWeb: { configGroup: 'MAP', configKey: 'TENCENT_MAP_KEY', configName: '腾讯 Web Key', configValue: '', enabled: 1, remark: '用于后台腾讯地图选点和 Web 展示' },
amapWeb: { configGroup: 'MAP', configKey: 'AMAP_WEB_KEY', configName: '高德 Web Key', configValue: '', enabled: 1, remark: '用于后台高德地图选点和 Web 展示' },
amapMini: { configGroup: 'MAP', configKey: 'AMAP_MINI_KEY', configName: '高德小程序 Key', configValue: '', enabled: 1, remark: '供 Salon 小程序地图能力使用' }
})
const userInfo = ref(loadCachedAdminUserInfo())
const load = async () => {
loading.value = true
try {
const [userConfigs, smsConfigs, workbenchConfigs, shopConfigs, mapConfigs] = await Promise.all([
adminSystemParameterConfigApi.listConfigs('USER'),
adminSystemParameterConfigApi.listConfigs('SMS'),
adminSystemParameterConfigApi.listConfigs('WORKBENCH'),
adminSystemParameterConfigApi.listConfigs('SHOP'),
adminSystemParameterConfigApi.listConfigs('MAP')
])
const defaultPassword = userConfigs.find(item => item.configKey === 'DEFAULT_PASSWORD')
if (defaultPassword) {
Object.assign(defaultPasswordForm, defaultPassword)
defaultPasswordEnabled.value = defaultPassword.enabled === 1
}
const smsProvider = smsConfigs.find(item => item.configKey === 'SMS_PROVIDER')
if (smsProvider) Object.assign(smsProviderForm, smsProvider)
const reviewNotice = workbenchConfigs.find(item => item.configKey === 'MANAGER_REGISTRATION_REVIEW_NOTICE')
if (reviewNotice) {
Object.assign(reviewNoticeForm, reviewNotice)
reviewNoticeEnabled.value = reviewNotice.enabled === 1 && String(reviewNotice.configValue).toLowerCase() === 'true'
}
const managerReviewMode = workbenchConfigs.find(item => item.configKey === 'MANAGER_REGISTRATION_AUTO_APPROVE')
if (managerReviewMode) {
Object.assign(managerReviewModeForm, managerReviewMode)
managerAutoApproveEnabled.value = managerReviewMode.enabled === 1 && String(managerReviewMode.configValue).toLowerCase() === 'true'
}
const shopValidity = shopConfigs.find(item => item.configKey === 'SHOP_DEFAULT_VALID_DAYS')
if (shopValidity) {
Object.assign(shopValidityForm, shopValidity)
shopDefaultValidDays.value = String(shopValidity.configValue || '30')
}
const mapByKey = Object.fromEntries(mapConfigs.map(item => [item.configKey, item])) as Record<string, SystemParameterConfigVO | undefined>
if (mapByKey.MAP_PROVIDER) Object.assign(mapForms.provider, mapByKey.MAP_PROVIDER)
if (mapByKey.TENCENT_MAP_KEY) Object.assign(mapForms.tencentWeb, mapByKey.TENCENT_MAP_KEY)
if (mapByKey.AMAP_WEB_KEY) Object.assign(mapForms.amapWeb, mapByKey.AMAP_WEB_KEY)
if (mapByKey.AMAP_MINI_KEY) Object.assign(mapForms.amapMini, mapByKey.AMAP_MINI_KEY)
mapForms.provider.configValue = mapForms.provider.configValue === 'AMAP' ? 'AMAP' : 'TENCENT'
mapEnabled.value = mapForms.provider.enabled === 1
userInfo.value = loadCachedAdminUserInfo()
} catch (error) {
message.error(error instanceof Error ? error.message : '系统设置加载失败')
} finally {
loading.value = false
}
}
const validateDefaultPassword = () => {
const password = defaultPasswordForm.configValue.trim()
if (password.length < 8 || password.length > 32) {
message.warning('默认密码长度需为 8-32 位')
return false
}
const categoryCount = [/[0-9]/.test(password), /[a-z]/.test(password), /[A-Z]/.test(password), /[^A-Za-z0-9]/.test(password)].filter(Boolean).length
if (categoryCount < 3) {
message.warning('默认密码需至少包含数字、小写字母、大写字母、特殊符号中的 3 类')
return false
}
return true
}
const saveDefaultPassword = async () => {
if (!validateDefaultPassword()) return
savingDefaultPassword.value = true
try {
await adminSystemParameterConfigApi.saveConfig({ ...defaultPasswordForm, configValue: defaultPasswordForm.configValue.trim(), enabled: defaultPasswordEnabled.value ? 1 : 0 })
message.success('账号默认密码已保存')
} catch (error) {
message.error(error instanceof Error ? error.message : '默认密码保存失败')
} finally {
savingDefaultPassword.value = false
}
}
const saveReviewNotice = async () => {
savingReviewNotice.value = true
try {
await adminSystemParameterConfigApi.saveConfig({ ...reviewNoticeForm, configValue: 'true', enabled: reviewNoticeEnabled.value ? 1 : 0 })
message.success(reviewNoticeEnabled.value ? '店长员工审核提醒已开启' : '店长员工审核提醒已关闭')
} catch (error) {
message.error(error instanceof Error ? error.message : '审核提醒设置保存失败')
} finally {
savingReviewNotice.value = false
}
}
const saveManagerReviewMode = async () => {
savingManagerReviewMode.value = true
try {
await adminSystemParameterConfigApi.saveConfig({
...managerReviewModeForm,
configValue: managerAutoApproveEnabled.value ? 'true' : 'false',
enabled: 1
})
message.success(managerAutoApproveEnabled.value ? '店长注册自动审核已开启' : '店长注册将由管理员人工复核')
} catch (error) {
message.error(error instanceof Error ? error.message : '审核模式保存失败')
} finally {
savingManagerReviewMode.value = false
}
}
const saveShopValidity = async () => {
const days = Number(shopDefaultValidDays.value)
if (!Number.isInteger(days) || days < 1 || days > 3650) {
message.warning('有效期请填写 1–3650 的整数天数')
return
}
savingShopValidity.value = true
try {
await adminSystemParameterConfigApi.saveConfig({ ...shopValidityForm, configValue: String(days), enabled: 1 })
message.success('新门店默认有效期已保存')
} catch (error) {
message.error(error instanceof Error ? error.message : '有效期设置保存失败')
} finally {
savingShopValidity.value = false
}
}
const saveMapConfig = async () => {
savingMap.value = true
try {
await adminSystemParameterConfigApi.saveConfig({ ...mapForms.provider, configValue: String(mapForms.provider.configValue).toUpperCase(), enabled: mapEnabled.value ? 1 : 0 })
await adminSystemParameterConfigApi.saveConfig({ ...mapForms.tencentWeb, enabled: mapEnabled.value ? 1 : 0 })
await adminSystemParameterConfigApi.saveConfig({ ...mapForms.amapWeb, enabled: mapEnabled.value ? 1 : 0 })
await adminSystemParameterConfigApi.saveConfig({ ...mapForms.amapMini, enabled: mapEnabled.value ? 1 : 0 })
message.success('地图配置已保存')
} catch (error) {
message.error(error instanceof Error ? error.message : '地图配置保存失败')
} finally {
savingMap.value = false
}
}
const saveSmsProvider = async () => {
const confirmed = window.confirm('保存后会同步全部短信验证码场景的模板、通道和发送方式,确认切换吗?')
if (!confirmed) return
savingSmsProvider.value = true
try {
await adminSystemParameterConfigApi.saveConfig({ ...smsProviderForm, configValue: smsProviderForm.configValue.toUpperCase(), enabled: 1 })
message.success('短信供应商已切换')
} catch (error) {
message.error(error instanceof Error ? error.message : '短信供应商保存失败')
} finally {
savingSmsProvider.value = false
}
}
onMounted(() => {
void load()
})
</script>
<style scoped>
.system-settings { display: grid; gap: 22px; color: var(--admin-mobile-ink); }
.settings-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.settings-eyebrow { color: var(--theme-primary-action); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.settings-header h1 { margin: 7px 0 4px; font-size: 27px; }
.settings-header p, .pane-head p { margin: 0; color: var(--admin-mobile-muted); font-size: 13px; }
.settings-health, .account-status { display: inline-flex; align-items: center; gap: 7px; color: var(--admin-mobile-muted); font-size: 12px; white-space: nowrap; }
.settings-health i, .account-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--theme-primary); }
.settings-layout { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { padding: 9px; border: 1px solid var(--admin-mobile-border); border-radius: 16px; background: color-mix(in srgb, var(--theme-card-bg) 84%, transparent); }
.settings-nav__label { display: block; padding: 7px 10px 8px; color: var(--admin-mobile-muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.settings-nav__item { display: flex; width: 100%; align-items: center; gap: 9px; padding: 11px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--admin-mobile-muted); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.settings-nav__item:hover, .settings-nav__item.is-active { background: var(--admin-mobile-accent-soft); color: var(--theme-primary-action); font-weight: 700; }
.settings-nav__icon { display: inline-flex; width: 22px; justify-content: center; color: var(--theme-primary); }
.settings-nav__hint { margin: 13px 8px 5px; padding-top: 12px; border-top: 1px solid var(--admin-mobile-border); color: var(--admin-mobile-muted); font-size: 11px; line-height: 1.55; }
.settings-pane, .settings-section-panel { min-width: 0; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 2px 0 14px; border-bottom: 1px solid var(--admin-mobile-border); }
.pane-head h2 { margin: 0 0 5px; font-size: 18px; }
.setting-group { margin-top: 17px; border-top: 1px solid var(--admin-mobile-border); }
.setting-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 2px 8px; }
.setting-group__head--with-action { align-items: center; }
.setting-group__head--with-action .ant-btn { margin-left: auto; }
.setting-group__head strong { font-size: 13px; }
.setting-group__head span { color: var(--admin-mobile-muted); font-size: 11px; letter-spacing: .08em; }
.setting-row { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(220px, 1.35fr) auto; align-items: center; gap: 18px; min-height: 72px; padding: 10px 14px; border-bottom: 1px solid color-mix(in srgb, var(--admin-mobile-border) 70%, transparent); background: color-mix(in srgb, var(--theme-card-bg) 82%, transparent); }
.setting-row:first-of-type { border-radius: 10px 10px 0 0; }
.setting-row--last { border-radius: 0 0 10px 10px; }
.setting-copy { display: grid; gap: 4px; min-width: 0; }
.setting-copy strong { font-size: 13px; }
.setting-copy__link { display: inline-flex; align-items: center; gap: 3px; margin-left: 7px; color: var(--theme-primary-action); font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.setting-copy__link:hover { text-decoration: underline; }
.setting-copy__link:focus-visible { outline: 2px solid color-mix(in srgb, var(--theme-primary) 55%, transparent); outline-offset: 2px; border-radius: 3px; }
.setting-copy__link :deep(.anticon) { font-size: 10px; }
.setting-copy span { color: var(--admin-mobile-muted); font-size: 11px; line-height: 1.45; }
.setting-control { display: flex; align-items: center; gap: 9px; min-width: 0; }
.setting-control > :deep(.ant-select) { width: 100%; }
.setting-control--password > :deep(.ant-input-affix-wrapper) { flex: 1; width: auto; min-width: 100px; }
.setting-control--password { min-width: 0; }
.setting-control--number { width: min(220px, 100%); }
.control-note { color: var(--admin-mobile-muted); font-size: 11px; white-space: nowrap; }
.setting-row > .control-note { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.setting-value { min-width: 0; color: var(--admin-mobile-ink); font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; color: var(--theme-primary-action); font-size: 11px; white-space: nowrap; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--theme-primary); }
.status-pill.is-muted { color: var(--admin-mobile-muted); }
.status-pill.is-muted::before { background: var(--admin-mobile-muted); }
.warning-note { display: inline-flex; align-items: center; gap: 5px; color: #a66d22; font-size: 11px; white-space: nowrap; }
.warning-note::before { content: '!'; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background: #fff3d9; font-size: 10px; font-weight: 800; }
.section-footnote { margin: 12px 2px 0; color: var(--admin-mobile-muted); font-size: 11px; }
@media (max-width: 760px) {
.settings-header { align-items: flex-start; }
.settings-health, .account-status { display: none; }
.settings-layout { grid-template-columns: 1fr; gap: 14px; }
.settings-nav { display: flex; gap: 4px; overflow-x: auto; padding: 6px; }
.settings-nav__label, .settings-nav__hint { display: none; }
.settings-nav__item { width: auto; flex: 0 0 auto; white-space: nowrap; }
.pane-head { align-items: flex-start; flex-direction: column; }
.pane-head .ant-btn { width: 100%; }
.setting-group__head--with-action { flex-wrap: wrap; }
.setting-group__head--with-action .ant-btn { width: 100%; margin-left: 0; }
.setting-row { grid-template-columns: 1fr; gap: 9px; padding: 13px 12px; }
.setting-control { width: 100%; }
.status-pill, .warning-note, .control-note { justify-self: start; }
}
</style>