/* ==========================================================================
   淘岛商城 管理后台 · 全局样式（对齐人人商城 V8 · 咖啡棕主题 #97754F）
   组件库：零构建自研 CSS 复刻 iView 视觉
   ========================================================================== */
:root {
  --bg: #f4f6f8;            /* 内容区灰白底 */
  --card: #ffffff;
  --border: #e8eaed;
  --t1: #2c3e50;            /* 标题/正文主色 */
  --t2: #515a6e;            /* 正文 */
  --t3: #939799;            /* 提示文字 hint */
  --primary: #97754F;       /* 主色 / 强调色（咖啡棕） */
  --primary-deep: #6b4f30;  /* 深咖啡（选中文字） */
  --primary-soft: #f7ede2;  /* 浅奶油选中背景 */
  --topnav-text: #b19875;   /* 顶部一级导航未选中文字 */
  --section-bg: #f4f6f8;    /* 分区标题条 */
  --up: #f5222d;
  --down: #22c55e;
  --ok-bg: #e8f7ee;   --ok-t: #1aa260;
  --warn-bg: #fef2e0; --warn-t: #e08a00;
  --dan-bg: #fdecec;  --dan-t: #e5484d;
  --radius: 2px;            /* iView 风格：小圆角 */
  --shadow: 0 1px 3px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--t2);
  font: 14px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f3ece2 0%, #f6f8fc 50%, #efe7da 100%);
}
.login-card {
  width: 380px; background: #fff; border-radius: 8px;
  box-shadow: 0 12px 40px rgba(107, 79, 48, .12);
  padding: 34px 32px 28px;
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-brand .logo {
  width: 34px; height: 34px; border-radius: 6px;
  background: linear-gradient(135deg, #b08a5e, #97754F);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
}
.login-brand b { font-size: 18px; letter-spacing: .5px; color: var(--t1); }
.login-sub { color: var(--t3); font-size: 13px; margin: 4px 0 22px 44px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--t2); margin-bottom: 6px; }
.input {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid #dcdfe6; border-radius: var(--radius); outline: none;
  background: #fff; font-size: 14px; color: var(--t1); transition: .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(151,117,79,.12); }
textarea.input { height: auto; padding: 8px 12px; resize: vertical; line-height: 1.5; }
.cap-row { display: flex; gap: 10px; }
.cap-row .input { flex: 1; }
.cap-img {
  width: 130px; height: 40px; border-radius: var(--radius); border: 1px solid #dcdfe6;
  object-fit: cover; cursor: pointer; background: #f5f7fa;
}
.btn-primary {
  width: 100%; height: 42px; margin-top: 8px; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, #b08a5e, #97754F); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: 1px; transition: .15s;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.login-tip { margin-top: 16px; font-size: 12px; color: var(--t3); text-align: center; }

/* ---------- 整体框架：顶部导航 + 内容 ---------- */
.shell { display: flex; flex-direction: column; min-height: 100vh; }
.topnav {
  height: 56px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px; position: sticky; top: 0; z-index: 30;
}
.topnav .brand { display: flex; align-items: center; gap: 10px; margin-right: 26px; }
.topnav .brand .logo {
  width: 26px; height: 26px; border-radius: 4px; color: #fff; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, #b08a5e, #97754F);
  display: flex; align-items: center; justify-content: center;
}
.topnav .brand b { font-size: 16px; color: var(--t1); letter-spacing: .5px; }
.topmenu { display: flex; align-items: center; flex: 1; height: 100%; }
.top-item {
  height: 56px; line-height: 56px; padding: 0 18px; position: relative;
  color: var(--topnav-text); font-size: 15px; font-weight: 700; cursor: pointer; user-select: none;
  transition: color .15s;
}
.top-item:hover { color: #7a5c38; }
.top-item.active { color: var(--primary); }
.top-item.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px;
  border-radius: 2px; background: var(--primary);
}
.topright { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.topright .uname { font-size: 13px; color: var(--t1); }
.wb-btn {
  height: 30px; padding: 0 14px; border: none; border-radius: var(--radius);
  background: var(--primary); color: #fff; font-size: 13px; transition: .15s;
}
.wb-btn:hover { filter: brightness(1.05); }
.link-btn { background: none; border: none; color: var(--t3); font-size: 13px; padding: 4px 8px; border-radius: 4px; }
.link-btn:hover { background: #f2f3f5; color: var(--t1); }

.body { display: flex; flex: 1; min-height: calc(100vh - 56px); }
.sidemenu {
  width: 200px; background: #fff; border-right: 1px solid var(--border);
  padding: 6px 0; flex: none;
}
.side-title { padding: 14px 18px 8px; font-size: 13px; color: var(--t3); font-weight: 600; }
.side-group-hd {
  display: flex; align-items: center; justify-content: space-between;
  height: 40px; padding: 0 18px; cursor: pointer; color: var(--t1);
  font-size: 14px; user-select: none; transition: background .15s;
}
.side-group-hd:hover { background: #f7f8fa; }
.side-group-hd .arrow { color: #c0c4cc; font-size: 12px; }
.side-sub { padding-bottom: 4px; }
.side-link {
  display: block; height: 38px; line-height: 38px; padding: 0 18px 0 34px;
  color: var(--t2); font-size: 14px; cursor: pointer;
}
.side-link:hover { background: #f7f8fa; color: var(--t1); }
.side-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.content { flex: 1; min-width: 0; padding: 16px 20px; }
.crumb { color: var(--t3); font-size: 13px; margin-bottom: 14px; }
.crumb .sep { margin: 0 6px; color: #c0c4cc; }
.crumb b { font-weight: 400; color: var(--t2); }
.crumb b:last-child { color: var(--t1); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px;
}
.card-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--t1); display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--primary); }
.card-more { color: var(--t3); font-size: 13px; }
.card-more:hover { color: var(--primary); }

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat { display: flex; align-items: center; gap: 14px; }
.stat .s-ico { width: 42px; height: 42px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.s-ico.blue { background: linear-gradient(135deg, #b08a5e, #97754F); }
.s-ico.purple { background: linear-gradient(135deg, #a78bfa, #7c5cf6); }
.s-ico.green { background: linear-gradient(135deg, #4ade80, #16a34a); }
.s-ico.orange { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.stat .s-body { min-width: 0; }
.stat .s-label { color: var(--t3); font-size: 13px; }
.stat .s-value { font-size: 22px; font-weight: 700; letter-spacing: .3px; margin-top: 2px; color: var(--t1); }
.delta { font-size: 12px; font-weight: 600; margin-left: 6px; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }

.grid-3 { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3b { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-3b { grid-template-columns: 1fr; }
}

/* ---------- 表格 ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--t3); font-size: 13px;
  padding: 10px 12px; border-bottom: 1px solid var(--border); background: #fafbfd;
}
.tbl td { padding: 12px; border-bottom: 1px solid #f5f6fa; font-size: 13px; color: var(--t1); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .col-op { text-align: right; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; line-height: 1.5; }
.tag.ok { background: var(--ok-bg); color: var(--ok-t); }
.tag.warn { background: var(--warn-bg); color: var(--warn-t); }
.tag.danger { background: var(--dan-bg); color: var(--dan-t); }
.tag.info { background: var(--primary-soft); color: var(--primary); }
.tag.gray { background: #f1f3f7; color: var(--t3); }

/* ---------- 快捷筛选 Tab ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs .tab { height: 32px; line-height: 32px; padding: 0 16px; border-radius: var(--radius); background: #f5f7fb; color: var(--t3); font-size: 13px; cursor: pointer; transition: .15s; }
.tabs .tab:hover { color: var(--t1); }
.tabs .tab.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- 列表 ---------- */
.list-row { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid #f5f6fa; cursor: pointer; }
.list-row:last-child { border-bottom: none; }
.list-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.list-row .lbl { flex: 1; font-size: 13px; color: var(--t1); }
.list-row .num { font-weight: 600; font-size: 13px; }
.list-row .arrow { color: var(--t3); font-size: 12px; }
.list-row:hover { background: #fafbfd; border-radius: 6px; }

/* ---------- 快捷操作 ---------- */
.quick-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .quick-row { grid-template-columns: repeat(2, 1fr); } }
.quick { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; cursor: pointer; transition: .15s; }
.quick:hover { box-shadow: 0 6px 18px rgba(151,117,79,.12); transform: translateY(-1px); border-color: #e4d3bd; }
.quick .q-ico { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.quick .q-t { font-weight: 600; font-size: 13px; color: var(--t1); }
.quick .q-d { color: var(--t3); font-size: 12px; margin-top: 2px; }

/* ---------- 工具条 ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input { height: 36px; width: 220px; }
.btn { height: 36px; padding: 0 16px; border-radius: var(--radius); border: 1px solid #dcdfe6; background: #fff; color: var(--t1); font-size: 13px; transition: .15s; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); color: #fff; }
.btn.ghost { background: #fff; border-color: #dcdfe6; color: var(--t1); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; color: var(--t3); font-size: 13px; }
.pager button { min-width: 32px; height: 32px; border-radius: var(--radius); border: 1px solid #dcdfe6; background: #fff; color: var(--t1); }
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager button.cur { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 其他 ---------- */
.chart { width: 100%; height: 260px; }
.chart-sm { width: 100%; height: 210px; }
.empty { text-align: center; color: var(--t3); padding: 48px 0; font-size: 13px; }
.placeholder-box { text-align: center; padding: 70px 20px; }
.placeholder-box .ph-ico { font-size: 40px; color: #dbe3f0; margin-bottom: 10px; }
.placeholder-box h3 { margin: 0 0 6px; font-size: 16px; color: var(--t1); }
.placeholder-box p { color: var(--t3); font-size: 13px; margin: 0; }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #1f2937; color: #fff; padding: 9px 18px; border-radius: 8px; font-size: 13px; z-index: 999; opacity: .96; }

/* ==========================================================================
   站点设置模块组 · iView 风格表单组件
   ========================================================================== */

/* 分区（灰条标题） */
.panel-section { margin-bottom: 18px; }
.section-title {
  background: var(--section-bg); color: var(--t1); font-size: 15px; font-weight: 700;
  padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px;
}

/* 表单项：左标签(右对齐) + 右控件 + 提示 */
.form-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.form-item > .label { width: 130px; flex: none; text-align: right; font-size: 14px; color: var(--t1); padding-top: 7px; }
.form-item > .ctrl { flex: 1; min-width: 0; }
.form-item .hint { color: var(--t3); font-size: 12px; margin-top: 6px; line-height: 1.6; }

/* 单选（行内） */
.radio-line { display: flex; gap: 20px; align-items: center; padding-top: 7px; flex-wrap: wrap; }
.radio-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--t1); cursor: pointer; user-select: none; }
.radio-item input { accent-color: var(--primary); width: 15px; height: 15px; }

/* 多选（行内 checkbox 组） */
.checkbox-line { display: flex; gap: 18px; align-items: center; padding-top: 7px; flex-wrap: wrap; }
.checkbox-item { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--t1); cursor: pointer; user-select: none; }
.checkbox-item input { accent-color: var(--primary); width: 15px; height: 15px; }

/* 开关 */
.switch { width: 44px; height: 22px; border-radius: 11px; background: #dcdfe6; position: relative; cursor: pointer; transition: .2s; display: inline-block; vertical-align: middle; }
.switch.on { background: var(--primary); }
.switch .knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on .knob { left: 24px; }

/* 卡片单选（样式选择） */
.card-radio { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 4px; }
.card-radio .opt {
  border: 1px solid #dcdfe6; border-radius: var(--radius); padding: 12px 16px; min-width: 116px;
  cursor: pointer; font-size: 14px; color: var(--t1); transition: .15s; background: #fff; text-align: center;
}
.card-radio .opt:hover { border-color: #c9a87f; }
.card-radio .opt.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* 颜色选择 */
.color-dot-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.color-dot { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px #e0e0e0; }
.color-dot.active { border-color: var(--t1); }

/* 图片上传占位 */
.upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.upload .thumb { width: 140px; height: 54px; border: 1px dashed #dcdfe6; border-radius: var(--radius); background: #fafafa; object-fit: contain; }
.upload .up-btn { height: 32px; padding: 0 14px; border: 1px solid #dcdfe6; background: #fff; border-radius: var(--radius); cursor: pointer; font-size: 13px; color: var(--t1); }
.upload .up-btn:hover { border-color: var(--primary); color: var(--primary); }
.upload .up-url { height: 32px; width: 280px; }
.upload .preview { max-width: 280px; max-height: 80px; border: 1px solid var(--border); border-radius: var(--radius); margin-top: 6px; }

/* 信息条（蓝底提示） */
.info-bar { background: #eaf1fb; border: 1px solid #d4e2f7; color: #3a6ea5; font-size: 13px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; line-height: 1.6; }

/* 表单底部操作条 */
.form-foot { display: flex; gap: 10px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }

/* 计数器（x/12） */
.counter { font-size: 12px; color: var(--t3); margin-left: 8px; }
