/* ============================================================================
   Vobl ID · 共享样式
   配色硬约束（勿改回去）：
     白字压明快橙不可能达到 WCAG 4.5:1（实测 #fff on #ee7318 = 2.96:1）。
     当前方案：橙底 + 深墨字 #401a00 on #ee7318 = 5.20:1 ✓
   ========================================================================== */

:root {
  --orange: #ee7318;
  --orange-soft: #fdf1e6;
  --orange-deep: #d8620c;
  --ink: #401a00;          /* 橙底上的文字色，对比度 5.20:1 */
  --text: #3a2b21;         /* 正文，白底 17.16:1 */
  --muted: #8a6a55;
  --line: #f0e4d8;
  --bg: #f7f3ee;
  --card: #ffffff;
  --ok: #1f7a4d;
  --warn: #9a5b00;
  --danger: #c0362c;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(64, 26, 0, .10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 12% -8%, #ffe6cf 0%, rgba(255,230,207,0) 60%),
    radial-gradient(900px 480px at 96% 4%, #ffeede 0%, rgba(255,238,222,0) 55%),
    var(--bg);
}

a { color: var(--orange-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 布局 ---------------- */

.wrap { max-width: 460px; margin: 0 auto; padding: 40px 20px 64px; }
.wrap.wide { max-width: 880px; }

.brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px; font-weight: 700; font-size: 20px; color: var(--ink);
}
/* 品牌标记：浅蓝云朵。
   配色为浅蓝底 + 中深蓝云，保证图形本身也有足够对比度（约 3.5:1 以上），
   不用白云压浅蓝底那种几乎看不见的组合。 */
.brand .dot {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(140deg, #dcefff, #a9d7fb);
  display: grid; place-items: center; color: #2b7fc4;
  box-shadow: 0 6px 16px rgba(58, 146, 214, .26);
}
.brand .dot svg { width: 20px; height: 20px; fill: currentColor; display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 28px;
  backdrop-filter: blur(12px);
}

h1 { font-size: 23px; margin: 0 0 6px; color: var(--ink); letter-spacing: -.2px; }
h2 { font-size: 17px; margin: 26px 0 12px; color: var(--ink); }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; line-height: 1.6; }

/* ---------------- 表单 ---------------- */

label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 16px 0 7px; }

input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 11px;
  font-size: 15px; background: #fffdfb; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(238, 115, 24, .14);
}
textarea { resize: vertical; min-height: 84px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 18px; margin-top: 22px;
  border: none; border-radius: 12px; cursor: pointer;
  font-size: 15.5px; font-weight: 700; font-family: inherit;
  background: linear-gradient(140deg, #f98a33, var(--orange));
  color: var(--ink);            /* ★ 深墨字，不是白字 */
  box-shadow: 0 8px 22px rgba(238, 115, 24, .34);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 11px 26px rgba(238, 115, 24, .42); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

.btn.ghost {
  background: #fff; color: var(--ink);
  border: 1.5px solid var(--line); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--orange); box-shadow: none; }
.btn.danger { background: var(--danger); color: #fff; box-shadow: none; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.foot { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 22px; }
.foot a { font-weight: 600; }

/* ---------------- 提示条 ---------------- */

.alert {
  border-radius: 11px; padding: 12px 14px; font-size: 13.5px;
  margin-bottom: 16px; line-height: 1.6; border: 1px solid transparent;
}
.alert.err  { background: #fdeceb; border-color: #f6c9c5; color: #8f2a22; }
.alert.ok   { background: #e9f7ef; border-color: #bfe6cf; color: #1b6b43; }
.alert.info { background: var(--orange-soft); border-color: #f6d7ba; color: #8a4a10; }
.alert[hidden] { display: none; }

/* ---------------- 能力位 / 权限条目 ---------------- */

.scopes { list-style: none; padding: 0; margin: 14px 0 0; }
.scopes li {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 11px; margin-bottom: 9px; font-size: 14px; line-height: 1.55;
}
.scopes li .tick { color: var(--ok); font-weight: 700; }

/* ---------------- 杂项 ---------------- */

.kv { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; color: var(--ink); }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--orange-soft); color: #8a4a10;
}
.badge.ok { background: #e9f7ef; color: #1b6b43; }
.badge.off { background: #f1ece8; color: var(--muted); }
.badge.warn { background: #fdf3e0; color: #8a5300; }
.badge.err { background: #fdeceb; color: #8f2a22; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.copy {
  background: #fbf7f3; border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; word-break: break-all; cursor: pointer; font-size: 13px;
}
.copy:hover { border-color: var(--orange); }

/* ============================================================================
   管理后台控制台
   ========================================================================== */

.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 22px; }
.admin-pane { margin-top: 16px; overflow-x: auto; }

/* 标签栏 */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.tab {
  padding: 8px 15px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--muted);
  font-size: 13.5px; font-weight: 600; font-family: inherit;
}
.tab:hover { border-color: var(--orange); color: var(--ink); }
.tab.on { background: var(--orange-soft); border-color: #f2c79c; color: #8a4a10; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.stat { border: 1px solid var(--line); border-radius: 12px; padding: 14px 15px; background: #fffdfb; }
.stat .v { font-size: 23px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.stat .k { font-size: 13px; color: var(--muted); margin-top: 3px; }
.stat .h { font-size: 12px; color: #b09684; margin-top: 5px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; color: var(--muted); font-weight: 700; white-space: nowrap; }
tbody tr:hover { background: #fffaf6; }
td.ops { white-space: nowrap; }

h3 { font-size: 15.5px; color: var(--ink); margin: 24px 0 10px; }

/* 工具条 */
.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.bar input[type=search], .bar input[type=email], .bar input[type=text], .bar select { width: auto; min-width: 160px; flex: 1 1 160px; }

.btn.sm { width: auto; padding: 9px 16px; font-size: 13.5px; margin-top: 0; border-radius: 10px; }

/* 行内小按钮 */
.mini {
  padding: 4px 9px; margin: 2px 3px 2px 0; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 12.5px; font-family: inherit;
}
.mini:hover { border-color: var(--orange); }
.mini.danger { color: var(--danger); border-color: #f0cfcc; }
.mini.danger:hover { background: #fdeceb; }

/* 内联表单卡 */
.card-inline { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fffdfb; }

/* 能力位选择 */
.cap-group { border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin: 12px 0; }
.cap-title { font-weight: 700; color: var(--ink); font-size: 13.5px; margin-bottom: 6px; }
.row-line { display: flex; align-items: flex-start; gap: 9px; padding: 5px 0; font-size: 13.5px; cursor: pointer; }
.row-line input { margin-top: 3px; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(64, 26, 0, .32); padding: 20px; backdrop-filter: blur(3px);
}
.modal-card {
  background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 460px;
  max-height: 84vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(64, 26, 0, .22);
}
.modal-card h3 { margin-top: 0; }

@media (max-width: 520px) {
  .wrap { padding: 24px 14px 48px; }
  .card { padding: 24px 20px; border-radius: 14px; }
  h1 { font-size: 21px; }
}

