/* 管理后台共享样式：登录、表单、数据表格与超级管理员。
   商家工作台布局和主题在 workspace.css 中定义。 */

:root {
  --bg: #f5f6f7;
  --card: #ffffff;
  --ink: #1d2125;
  --ink-2: #5c6570;
  --ink-3: #8b949e;
  --line: #dfe3e8;
  --accent: #1f6feb;
  --accent-ink: #ffffff;
  --danger: #c0392b;
  --ok: #1a7f37;
  --radius: 8px;
}

* { box-sizing: border-box; }

/* 必须有这一条：下面有用 ID 选择器写 display 的规则，优先级高于浏览器默认的
   [hidden]{display:none}，会盖掉 hidden 属性，导致隐藏的元素依然显示。 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

h1, h2, h3 { margin: 0; font-weight: 600; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

a { color: var(--accent); }

button {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button:hover { opacity: .9; }
button:disabled { opacity: .5; cursor: default; }

button.ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
button.mini { padding: 4px 10px; font-size: 12px; }

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(31,111,235,.25); border-color: var(--accent); }
textarea { resize: vertical; min-height: 68px; }

label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; }
label input, label select, label textarea { margin-top: 5px; }

/* ── 登录 ───────────────────────────────────────
   这一块**刻意不用**后台那套浅灰 + 蓝，改成和小程序登录页同一套品牌色
   （奶白 #fbf8f1 + 香槟金 #c0a070，色值取自 logo）。
   所有规则都用 #view-login 限定，不影响工作台。 */

#view-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 20px 32px;
  background: #fbf8f1;
}

/* 品牌区。logo 的底色就是 #fbf8f1，和页面底同一个色，所以不用套圆角框，
   看着就是 logo 浮在背景上 —— 和小程序登录页同一个处理 */
#view-login .login-head { text-align: center; }
#view-login .login-mark { display: block; width: 72px; height: 72px; margin: 0 auto; }
#view-login .login-title {
  margin-top: 16px;
  font-family: "Songti SC", STSong, serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #a8874e;
}
#view-login .login-sub { margin: 6px 0 0; color: #8a7a63; font-size: 12.5px; letter-spacing: .5px; }

/* 声明：左对齐、和卡片同宽，压在白卡上方 */
#view-login .login-note {
  width: 100%;
  max-width: 340px;
  margin: 28px 0 12px;
  color: #b3a68f;
  font-size: 11.5px;
  line-height: 1.5;
}

#view-login .login-card {
  width: 100%;
  max-width: 340px;
  padding: 28px 24px;
  background: #fff;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(160, 130, 90, .12);
}

body[data-portal="super"] #view-login .login-methods,
body[data-portal="super"] #smsLoginForm {
  display: none;
}

#view-login .login-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 0 0 22px;
  padding: 3px;
  border-radius: 9px;
  background: #f3ecdf;
}
#view-login .login-method {
  padding: 7px 8px;
  border-radius: 7px;
  background: transparent;
  color: #8a7a63;
  font-size: 13px;
  font-weight: 500;
}
#view-login .login-method.on { background: #fff; color: #5f4826; box-shadow: 0 1px 4px rgba(92, 65, 32, .10); }

/* 输入框换成品牌色。上面那套浅灰 + 蓝是给后台内部用的，这里按 id 盖掉 */
#view-login label { color: #33281e; font-size: 12.5px; }
#view-login input[type=text],
#view-login input[type=password],
#view-login input[type=tel] {
  padding: 9px 10px;
  border: 1px solid #ece2d0;
  border-radius: 9px;
  background: #faf6ee;
  color: #33281e;
}
#view-login input[type=text]:focus,
#view-login input[type=password]:focus,
#view-login input[type=tel]:focus {
  outline: none;
  border-color: #c0a070;
  box-shadow: 0 0 0 3px rgba(192, 160, 112, .18);
}

/* 同意条例。用原生 checkbox + accent-color，不必自己画一个假的勾选框 */
#view-login .login-agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 2px 0 16px;
}
#view-login .login-agree input[type=checkbox] {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #c0a070;
}
#view-login .login-agree label {
  flex: 1;
  min-width: 0;
  margin: 0;
  color: #8a7a63;
  font-size: 12.5px;
  line-height: 1.5;
}
#view-login .login-agree a { color: #a8874e; text-decoration: none; }
#view-login .login-agree a:hover { text-decoration: underline; }

/* 主按钮：logo 那个金色渐变 */
#view-login #loginBtn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e0c090, #c0a070);
  color: #3a2c14;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
}
#view-login #smsLoginBtn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 9px;
  background: linear-gradient(135deg, #e0c090, #c0a070);
  color: #3a2c14;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
}
#view-login #loginBtn:hover { opacity: .9; }
#view-login #smsLoginBtn:hover { opacity: .9; }

#view-login .sms-code-row { display: flex; gap: 8px; margin-top: 5px; }
#view-login .sms-code-row input { margin-top: 0; min-width: 0; }
#view-login .sms-send {
  flex: 0 0 108px;
  padding: 0 8px;
  border: 1px solid #d8bf93;
  border-radius: 9px;
  background: #fffaf2;
  color: #8d6a32;
  font-size: 12px;
}
#view-login .sms-send:disabled { color: #ab9d89; border-color: #e7dece; background: #f5f1e9; }
#view-login .login-tip { margin: -4px 0 12px; color: #8a7a63; font-size: 12px; line-height: 1.45; }
#view-login .login-tip.bad { color: #b4553f; }

/* 登录页的错误提示用品牌色；其他界面照旧走全局那条（见下面 .err） */
#view-login .err { color: #b4553f; }

#view-login .login-register-link,
#view-login .register-back {
  display: block;
  width: 100%;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a8874e;
  font-size: 12.5px;
  cursor: pointer;
}
#view-login .login-register-link:hover,
#view-login .register-back:hover { text-decoration: underline; }
#view-login .register-form { display: grid; gap: 11px; }
#view-login .register-heading { display:flex; flex-direction:column; gap:4px; margin:0 0 4px; }
#view-login .register-heading strong { color:#5f4826; font-size:16px; }
#view-login .register-heading span { color:#9a8b76; font-size:11.5px; }
#view-login .register-form select {
  width:100%; padding:9px 10px; border:1px solid #ece2d0; border-radius:9px;
  background:#faf6ee; color:#33281e; font:inherit;
}
#view-login .register-form select:focus { outline:none; border-color:#c0a070; box-shadow:0 0 0 3px rgba(192,160,112,.18); }
#view-login #registerBtn {
  width:100%; padding:11px 16px; border-radius:9px; border:0;
  background:linear-gradient(135deg,#e0c090,#c0a070); color:#3a2c14;
  font-size:15px; font-weight:600; letter-spacing:1px; cursor:pointer;
}
#view-login #registerBtn:disabled { opacity:.55; cursor:wait; }
#view-login .register-agree { display:flex; align-items:flex-start; gap:8px; margin:2px 0 0; }
#view-login .register-agree input { flex:0 0 auto; width:15px; height:15px; margin:2px 0 0; accent-color:#c0a070; }
#view-login .register-agree label { margin:0; color:#8a7a63; font-size:12px; line-height:1.5; }
#view-login .register-agree a { color:#a8874e; text-decoration:none; }
#view-login .register-agree a:hover { text-decoration:underline; }
body[data-portal="super"] #showRegisterBtn,
body[data-portal="super"] #registerForm { display:none !important; }
#view-login.is-registering { padding-top:28px; }
#view-login.is-registering .login-mark { width:52px; height:52px; }
#view-login.is-registering .login-title { margin-top:8px; }
#view-login.is-registering .login-note { margin-top:18px; }
#view-login .register-form > label { margin-bottom:0; }
#view-login .register-back { margin-top:0; }

.err { margin: 14px 0 0; color: var(--danger); font-size: 13px; }
.ok { color: var(--ok); font-size: 13px; }

/* ── 超管顶栏 ─────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* 手机上放不下时整栏换行：右边那组（新建租户/退出）挪到第二行。
     不换行的话左右两组会挤在一起、文字互相压。 */
  flex-wrap: wrap;
  row-gap: 8px;
  padding: 12px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar-l { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex-wrap: wrap; row-gap: 4px; }
.topbar-l span {
  color: var(--ink-3);
  font-size: 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.topbar-r { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.topbar-l .brand { font-weight: 700; color: var(--ink); letter-spacing: .04em; }

/* ── 超管标签页 ───────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.tab {
  background: transparent;
  color: var(--ink-2);
  border-radius: 0;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
}
.tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── 面板 ─────────────────────────────────────── */
.panel { max-width: 900px; margin: 0 auto; padding: 20px 20px 120px; }
.panel[hidden] { display: none; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.row-between select { width: auto; }

.section {
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.section > summary {
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
}
.section > summary::-webkit-details-marker { display: none; }
.section > summary::after { content: "▾"; color: var(--ink-3); font-size: 12px; }
.section[open] > summary::after { content: "▴"; }
.section-body { padding: 16px; border-top: 1px solid var(--line); }

/* 免费档的只读板块（目前就是档期）：整块点不动 + 压暗。
   用 pointer-events 是为了连日历格子那种 div 点选也一起挡住 ——
   只 disabled 掉 input/button 拦不住它们。 */
.section-body.locked {
  pointer-events: none;
  opacity: .45;
}

.section-lock {
  margin: 12px 16px 0;
  padding: 8px 12px;
  border: 1px solid #f0e2c4;
  border-radius: 8px;
  background: #fdf6e8;
  color: #8a6a3c;
  font-size: 12.5px;
}

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
@media (max-width: 620px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ── 重复项（案例/团队/好评）─────────────────── */
.item {
  position: relative;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fcfdfe;
}
.item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.item-head b { font-size: 13px; color: var(--ink-2); }
.item-tools { display: flex; gap: 6px; }

.addbtn {
  width: 100%;
  background: transparent;
  color: var(--accent);
  border: 1px dashed var(--line);
}
.addbtn:hover { border-color: var(--accent); background: rgba(31,111,235,.04); }

/* ── 图片字段 ─────────────────────────────────── */
.imgfield { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.imgfield-preview {
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f0f2f4 center/cover no-repeat;
}
.imgfield-body { flex: 1; min-width: 0; }
.imgfield-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ── 多图字段（顶部轮播）── */
.imglist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }

.imglist-row { display: flex; align-items: center; gap: 8px; }

.imglist-thumb {
  width: 54px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f0f2f4 center/cover no-repeat;
}

.imglist-row input { flex: 1; min-width: 0; }

.imglist-tools { display: flex; gap: 4px; flex: 0 0 auto; }
.imglist-tools .mini { padding: 4px 9px; }

/* ── 保存条 ───────────────────────────────────── */
.savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 12px 20px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
}
.savestate { color: var(--ink-3); font-size: 13px; }

/* ── 数据看板 ─────────────────────────────────── */
.kpi { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.kpi > div {
  flex: 1;
  min-width: 120px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.kpi em { display: block; font-style: normal; color: var(--ink-3); font-size: 12px; margin-bottom: 6px; }
.kpi strong { font-size: 24px; font-weight: 600; }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 13.5px; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid #eef1f4; }
th:first-child, td:first-child { text-align: left; }
th { background: #fafbfc; color: var(--ink-2); font-size: 12px; font-weight: 600; }
tr:last-child td { border-bottom: 0; }

/* ── 手机上的表格：改成「一行一个指标」 ──────────────────
   7~8 列的表在手机宽度里根本放不下，中文会被压成竖排（一个字一行）。
   窄屏下表头藏掉，每一格靠自己的 data-label 说明这个数字是什么。
   宽屏上完全不生效，还是普通表格。 */
@media (max-width: 620px) {
  table.responsive { border: 0; background: transparent; overflow: visible; }
  table.responsive thead { display: none; }
  table.responsive,
  table.responsive tbody,
  table.responsive tr { display: block; width: 100%; }
  table.responsive tr {
    margin-bottom: 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
  }
  table.responsive td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 14px;
    text-align: right;
    border-bottom: 1px solid #eef1f4;
  }
  table.responsive tr td:last-child { border-bottom: 0; }
  table.responsive td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--ink-3);
    font-size: 12.5px;
    text-align: left;
    white-space: nowrap;
  }
}

.hint { margin-top: 16px; color: var(--ink-3); font-size: 12.5px; }
.narrow { max-width: 340px; }

/* ── 提示条 ───────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%);
  z-index: 50;
  padding: 10px 20px;
  border-radius: 999px;
  background: #1d2125;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px -12px rgba(0,0,0,.6);
}
.toast.bad { background: var(--danger); }
.toast[hidden] { display: none; }

/* ── 档期日历编辑器 ───────────────────────────────── */

.sched-editor { max-width: 480px; }

.sched-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sched-navbtn {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.sched-navbtn:hover { border-color: var(--accent); color: var(--accent); }

.sched-month {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.sched-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.sched-dow span {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
}

.sched-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.sched-day {
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.sched-day:hover { border-color: var(--accent); }

.sched-day.empty {
  border: none;
  background: transparent;
  cursor: default;
}

.sched-day.past {
  color: var(--ink-3);
  background: var(--bg);
}

.sched-day.booked {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.sched-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-2);
}

.sched-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--card);
}

.sched-dot.booked {
  background: var(--accent);
  border-color: var(--accent);
  margin-left: 12px;
}

/* 工作台风格选择：缩略图组件（布局由 workspace.css 定义） */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px; }
.style-item { display: flex; flex-direction: column; }
.style-cell {
  border: 2px solid var(--line); border-radius: 10px; overflow: hidden;
  cursor: pointer; background: #131314; transition: box-shadow .12s, border-color .12s;
}
.style-cell.active { border-color: var(--accent); }
.style-cell:hover { box-shadow: 0 8px 20px -14px rgba(31,111,235,.5); }
.style-thumb { height: 260px; overflow: hidden; position: relative; background: #131314; }
/* 嵌展示页的实时预览：按手机宽度 375px 渲染，再缩到格子大小，
   hover 时由 JS 滚动 iframe 内容实现「滚动看整页」 */
.style-preview {
  width: 375px;
  height: 2000px;
  border: 0;
  transform: scale(0.35);
  transform-origin: top left;
  pointer-events: none;   /* 不让 iframe 抢鼠标，hover 由外层格子触发 */
}
.style-name { margin-top: 8px; font-weight: 600; color: var(--ink); font-size: 13px; }
.style-desc { margin-top: 2px; color: var(--ink-3); font-size: 11px; }

/* 档位角标，压在缩略图右上角。免费=灰，VIP=金。 */
.style-tier {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; color: #fff; line-height: 1.6;
}
.style-tier.free { background: var(--ink-3); }
.style-tier.vip { background: #b89047; }

.style-badge {
  margin-top: 3px; align-self: flex-start; display: inline-block; font-size: 11px; color: var(--accent);
  background: #eef3fd; border-radius: 999px; padding: 2px 8px; font-weight: 600;
}
.style-badge.dim { color: var(--ink-3); background: #f0f0f0; }
.style-card-actions { display: flex; gap: 6px; margin-top: 10px; }
.style-card-actions button { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--accent); font-size: 11px; }
.style-card-actions button:disabled { background: var(--accent); color: var(--accent-ink); opacity: 1; }

/* ═══════════════════════════════════════════════════
   超级管理员
   商家使用新版工作台；这边保留独立的「租户列表 + 弹层」，
   信息密度更高，所以用卡片不用表格。
   ═══════════════════════════════════════════════════ */

.primary-sm {
  background: var(--accent); color: var(--accent-ink);
  padding: 6px 14px; font-size: 13px; font-weight: 600;
}

/* ── 概览计数 ─────────────────────────────────────── */
.scounts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
#view-super .panel { max-width: 1480px; padding: 28px 32px 80px; }
#view-super .topbar, #view-super .tabs { padding-left: 32px; padding-right: 32px; }
#view-super h1 { font-size: 22px; }
#view-super .row-between { margin-bottom: 20px; }
#view-super .kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-bottom: 1px solid var(--line); }
#view-super .kpi > div { min-width: 0; padding: 16px 14px; border: 0; border-radius: 0; background: transparent; }
#view-super .kpi strong { font-size: 26px; overflow-wrap: anywhere; }
#view-super .scounts { margin-top: 20px; }
.super-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 22px 0 14px; }
.super-filters input { flex: 1 1 260px; min-width: 0; }
.super-filters select { max-width: 100%; width: auto; min-width: 130px; }
.super-table-wrap { overflow-x: auto; }
.super-table { width: 100%; border-collapse: collapse; background: #fff; }
.super-table th, .super-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.super-table th { color: var(--ink-2); background: #f0f2f5; font-size: 12px; white-space: nowrap; }
.super-table td { font-size: 13px; }
.super-table td small { display: block; margin-top: 4px; color: var(--ink-2); overflow-wrap: anywhere; }
.super-table .super-user-name { display: block; max-width: 230px; overflow-wrap: anywhere; }
.super-table .super-actions { display: flex; gap: 6px; flex-wrap: wrap; min-width: 160px; }
.super-actions button { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.super-vip { display: inline-block; color: #8a570b; background: #fff3d5; padding: 2px 8px; border-radius: 4px; }
.super-free { display: inline-block; color: #5c6570; background: #eef0f3; padding: 2px 8px; border-radius: 4px; }
.super-pager { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.super-price-input { min-width: 100px; max-width: 180px; }
.super-price-save { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.super-section-title { margin: 32px 0 14px; }
.super-price-save button { display: inline-flex; align-items: center; gap: 6px; }
.media-toolbar { display: flex; align-items: end; gap: 18px; flex-wrap: wrap; margin: 20px 0; }
.media-toolbar label { display: grid; gap: 7px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.media-toolbar select { min-width: 280px; }
.super-media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.super-media-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.super-media-preview { display: block; width: 92px; height: 72px; object-fit: cover; border-radius: 7px; background: #eef0f3; }
.super-media-meta { min-width: 0; display: grid; gap: 5px; }
.super-media-meta b { overflow-wrap: anywhere; font-size: 12px; }
.super-media-meta small { color: var(--ink-3); font-size: 11px; }
.super-media-meta a { color: var(--accent); font-size: 11px; text-decoration: none; }
@media (max-width: 560px) {
  .media-toolbar select { min-width: 0; width: 100%; }
  .media-toolbar label { width: 100%; }
  .super-media-item { grid-template-columns: 72px minmax(0, 1fr); }
  .super-media-preview { width: 72px; height: 60px; }
  .super-media-item > button { grid-column: 2; justify-self: start; }
}
.super-data-eyebrow { margin: 0 0 8px; font-size: 10px; font-weight: 700; letter-spacing: .18em; color: #8a98ae; }
#spanel-data .row-between h1 { margin: 0; }
#spanel-data .row-between .hint { margin: 8px 0 0; }
#spanel-data #skpi { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border: 0; margin-bottom: 24px; }
#spanel-data #skpi > div { min-height: 112px; padding: 16px 18px; background: #fff; border: 1px solid #e3e8f0; border-radius: 10px; }
#spanel-data #skpi strong { display: block; font-size: 25px; margin: 6px 0; color: #1f2c43; }
#spanel-data #skpi em { font-size: 12px; color: #738198; font-style: normal; }
#spanel-data #skpi small { display: block; font-size: 11px; color: #8794a7; }
.super-data-section { margin-top: 32px; }
.super-data-section-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 14px; }
#view-super .super-data-section-head h2 { margin: 0; font-size: 17px; color: #26334a; }
.super-data-section-head .hint { margin: 6px 0 0; }
.super-payment-section { padding: 20px; background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; }
.super-order-tools { display: flex; justify-content: end; gap: 8px; flex: 0 1 470px; }
.super-order-tools input { min-width: 180px; max-width: 300px; }
.super-order-tools select { width: 138px; flex: 0 0 auto; }
#superOrdersTable .super-table { min-width: 900px; }
.super-order-buyer strong { display: block; font-weight: 600; color: #24334a; }
.super-order-buyer small { display: block; margin-top: 4px; color: #8693a5; font-size: 11px; }
.super-order-amount { white-space: nowrap; color: #33445d; }
.super-order-amount.paid { color: #16734b; }
.super-order-status { display: inline-block; padding: 4px 9px; border-radius: 4px; white-space: nowrap; font-size: 12px; }
.super-order-status.paid { color: #16734b; background: #e9f6ef; }
.super-order-status.pending { color: #93600d; background: #fff4df; }
.super-order-status.closed, .super-order-status.failed { color: #697586; background: #f0f2f5; }
.super-orders-empty { margin: 0; padding: 30px 12px; color: #8794a7; text-align: center; font-size: 13px; }
#superOrdersNote { margin: 12px 0 0; font-size: 11px; }
.super-chart-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; margin: 20px 0; }
.super-chart-card { min-width: 0; background: #fff; border: 1px solid #e3e8f0; border-radius: 14px; padding: 24px; }
.super-chart-card header { margin-bottom: 18px; }
#view-super .super-chart-card h2 { margin: 0 0 7px; font-size: 16px; color: #26334a; }
.super-chart-card header p { margin: 0; font-size: 11px; line-height: 1.6; color: #8a98ab; }
.super-chart-legend { display: flex; gap: 20px; font-size: 11px; color: #687890; margin-bottom: 8px; }
.super-chart-legend span, .super-donut-key span { display: inline-flex; align-items: center; gap: 8px; }
.super-chart-legend i, .super-donut-key i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.super-line-chart { display: block; width: 100%; height: auto; overflow: visible; }
.super-chart-axis { font-size: 11px; fill: #8d9aac; font-family: inherit; }
.super-chart-tooltip { min-height: 17px; margin: 8px 0; font-size: 11px; color: #7d8ca2; }
.super-chart-source { margin-top: 12px; }
.super-chart-source summary { cursor: pointer; font-size: 11px; color: #8794a7; }
.super-chart-source .super-table-wrap { max-height: 300px; margin-top: 12px; }
.super-donut-layout { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.super-donut { width: 190px; max-width: 60%; height: auto; flex-shrink: 0; }
.super-donut-value { font-size: 34px; font-weight: 600; fill: #26334a; font-family: inherit; }
.super-donut-key { flex: 1; min-width: 110px; font-size: 12px; color: #738198; }
.super-donut-key > div { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 20px 0; }
.super-donut-key strong { color: #26334a; }
.super-donut-key small { grid-column: 1 / -1; padding-left: 16px; color: #9ba7b8; }
.super-bar-list { display: grid; gap: 20px; margin-top: 24px; }
.super-bar-heading { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #738198; margin-bottom: 8px; }
.super-bar-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.super-bar-heading strong { font-weight: 600; color: #26334a; }
.super-bar-track { height: 7px; background: #f0f3f8; border-radius: 8px; overflow: hidden; }
.super-bar-track > div { height: 100%; border-radius: 8px; min-width: 0; }
.super-chart-empty { padding: 60px 0; text-align: center; color: #9ba7b8; font-size: 13px; }
.super-data-details { background: #fff; border: 1px solid #e3e8f0; border-radius: 12px; padding: 20px 24px; margin: 24px 0 14px; }
.super-data-details > summary { cursor: pointer; color: #52637e; font-size: 13px; font-weight: 600; }
.super-data-details .super-table-wrap { margin-top: 20px; }
#spanel-data[aria-busy=true] #superCharts, #spanel-data[aria-busy=true] #skpi { opacity: .45; }
@media (max-width: 1050px) {
  .super-chart-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 800px) {
  #view-super .panel { padding: 20px 16px 60px; }
  #view-super .topbar, #view-super .tabs { padding-left: 16px; padding-right: 16px; flex-wrap: wrap; }
  #view-super .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .super-table { min-width: 760px; }
  .super-filters input { flex-basis: 100%; }
  .super-chart-card { padding: 20px 16px; }
  #spanel-data #skpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #spanel-data #skpi > div { min-height: 100px; padding: 14px; }
  #spanel-data #skpi strong { font-size: 22px; }
  .super-donut-layout { justify-content: center; }
  .super-data-section-head { align-items: stretch; flex-direction: column; }
  .super-order-tools { flex: none; justify-content: stretch; }
  .super-order-tools input { flex: 1 1 auto; min-width: 0; max-width: none; }
  .super-order-tools select { width: 120px; }
  .super-payment-section { padding: 16px 12px; }
}
.scount {
  flex: 1 1 0; min-width: 110px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px;
}
.scount strong { display: block; font-size: 22px; font-weight: 600; }
.scount em { font-style: normal; color: var(--ink-3); font-size: 12px; }
.scount.zero strong { color: var(--ink-3); }

/* ── 分组标题 ─────────────────────────────────────── */
.tgroup {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 22px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.tgroup em { font-style: normal; color: var(--ink-3); font-size: 12.5px; font-weight: 400; }

/* ── 租户卡片 ─────────────────────────────────────── */
.tc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px;
}
.tc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tc-head b { font-size: 15px; }
.tc-link { font-size: 12px; color: var(--ink-3); text-decoration: none; flex: 0 0 auto; }
.tc-link:hover { color: var(--accent); }
.tc-meta { color: var(--ink-2); font-size: 12.5px; margin-top: 4px; }

.tc-badge { display: inline-block; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.tc-badge.warn { background: #fff4e0; color: #9a6100; }
.tc-badge.stop { background: #fbe9e7; color: var(--danger); }

.tc-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tc-btn {
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  padding: 5px 12px; font-size: 13px; border-radius: 6px; cursor: pointer;
}
.tc-btn:hover { border-color: var(--accent); color: var(--accent); }
.tc-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.tc-btn.primary:hover { color: var(--accent-ink); }
.tc-btn.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ── 弹层 ─────────────────────────────────────────── */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); }
.sheet {
  position: fixed; z-index: 40;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px)); max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--card); border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line);
}
.sheet-x { background: none; border: 0; color: var(--ink-3); font-size: 16px; cursor: pointer; padding: 0 4px; }
.sheet-body { padding: 16px 18px; overflow-y: auto; }
.sheet-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 18px 16px; border-top: 1px solid var(--line);
}
.sheet-foot .ghost { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.sheet-note { margin: 0 0 8px; color: var(--ink-2); font-size: 13px; }
.sheet-list { margin: 0 0 12px; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.sheet .err { margin: 0 18px 12px; }

/* ── 表单控件 ─────────────────────────────────────── */
.sf { display: block; margin-bottom: 14px; }
.sf > span { display: block; color: var(--ink-2); font-size: 12.5px; margin-bottom: 6px; }
.sf input[type="text"], .sf input:not([type]), .sf input[type="datetime-local"] {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 6px; font-family: inherit; font-size: 14px; color: var(--ink);
}
.sf input:disabled { background: #f2f4f6; color: var(--ink-3); }
.sf-row { display: flex; gap: 8px; }
.sf-row input { flex: 1; }
.sf-tip { color: var(--ink-3); font-size: 12px; margin: -8px 0 14px; }
.sf-chk { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; font-size: 14px; }
.sf-chk input { width: auto; }
.sf-acc { border-left: 2px solid var(--line); padding-left: 14px; margin-bottom: 6px; }
.sf-quick { display: flex; gap: 6px; margin-bottom: 8px; }
.sf-q {
  background: #f2f4f6; border: 0; color: var(--ink-2);
  padding: 4px 10px; font-size: 12.5px; border-radius: 6px; cursor: pointer;
}
.sf-q:hover { background: #e6eaef; color: var(--accent); }

/* 二选一分段控件（永久 / 指定时间、主持人 / 婚庆公司） */
.seg { display: flex; margin-bottom: 10px; }
.seg-i {
  flex: 1; padding: 7px 0; background: #fff; border: 1px solid var(--line);
  color: var(--ink-2); font-size: 13px; cursor: pointer;
}
.seg-i:first-child { border-radius: 6px 0 0 6px; }
.seg-i:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.seg-i.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* 角色选择：5 个角色，用能换行的胶囊而不是挤成一条的分段条 */
.role-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.role-btn {
  padding: 7px 14px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  border-radius: 999px; font-size: 13px; cursor: pointer;
}
.role-btn:hover { border-color: var(--accent); color: var(--accent); }
.role-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

/* ── 视频上传卡：一屏只做一件事 ───────────────────── */
.vfield { margin-bottom: 14px; }
.vfield-label { font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }

.vdrop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 100%; min-height: 94px; padding: 16px;
  border: 1px dashed var(--line); border-radius: 10px; background: #fafbfc;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.vdrop:hover { border-color: var(--accent); background: #fffdf8; }
.vdrop b { font-size: 14px; font-weight: 600; color: var(--ink); }
.vdrop small { font-size: 12px; color: #98a2ad; }

.vup { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vup-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; }
.vup-top b { font-weight: 600; }
.vbar { height: 6px; border-radius: 3px; background: #edf0f2; overflow: hidden; }
.vbar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--accent); transition: width .12s linear; }
.vup-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--ink-2); }

.vdone { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.vthumb {
  width: 76px; height: 76px; flex: 0 0 auto; border-radius: 8px;
  background: #111 center/cover no-repeat; color: #cfd6dc; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.vthumb.plain { background: #f0f2f4; color: #98a2ad; }
.vmeta { flex: 1; min-width: 0; }
.vmeta b { display: block; font-size: 13px; }
.vmeta small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vacts { display: flex; gap: 12px; margin-top: 7px; }

.vlink { background: none; border: 0; padding: 0; font-size: 12px; color: var(--accent); cursor: pointer; }
.vlink:hover { text-decoration: underline; }
.vlink.danger { color: #c4472f; }

.verr { padding: 10px 12px; border: 1px solid #f0c9c1; border-radius: 10px; background: #fdf4f2; font-size: 12.5px; color: #a33a25; }
.verr-actions { display: flex; gap: 12px; margin-top: 6px; }

.verr-more { margin-top: 8px; }
.verr-more summary { font-size: 12px; color: #8a6a3b; cursor: pointer; }
.verr-more pre {
  margin: 6px 0 0; max-height: 120px; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
  font-size: 11px; line-height: 1.5; color: #7a5048;
}
