* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }

body {
  min-height: 100vh;
  color: #e8ecff;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1100px 560px at 18% -8%, #1b2452 0%, transparent 62%),
    radial-gradient(900px 520px at 92% -4%, #2b1f4b 0%, transparent 58%),
    #0b1020;
}

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 28px;
  background: rgba(11, 16, 32, .74);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, #6d8bff, #b46bff); box-shadow: 0 0 12px rgba(120, 140, 255, .7); }
.brand i { font-style: normal; font-size: 11px; font-weight: 500; color: #7f8ab8; letter-spacing: 2px; margin-left: 2px; }
.links { display: flex; gap: 4px; }
.links a {
  font-size: 13px; color: #98a3d0; text-decoration: none;
  padding: 8px 13px; border-radius: 10px; transition: .18s;
}
.links a:hover { color: #dfe5ff; background: rgba(255, 255, 255, .06); }
.links a.on { color: #fff; background: rgba(111, 140, 255, .18); box-shadow: inset 0 0 0 1px rgba(111, 140, 255, .28); }
.links a.out { color: #6f7aa6; }
.links a.out:hover { color: #ffb3b3; background: rgba(255, 110, 110, .1); }

main { max-width: 1200px; margin: 0 auto; padding: 26px 28px 72px; }

/* ---------- 布局 ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 22px; align-items: start; }
.side { display: flex; flex-direction: column; gap: 18px; }

.panel {
  position: relative;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  padding: 22px;
  overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
}
.panel-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h2 { font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.panel h3 { font-size: 13px; font-weight: 600; letter-spacing: 1.2px; color: #b6c0e8; margin-bottom: 12px; text-transform: uppercase; }
.tag {
  font-size: 11px; color: #a7b2de; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
}
.hint { font-size: 11.5px; color: #7d88b6; line-height: 1.6; margin-top: 10px; }

/* ---------- 预览 ---------- */
.preview-panel { padding-bottom: 10px; }
.phone { display: flex; justify-content: center; padding: 16px 0 22px; }
.phone iframe { width: 390px; max-width: 100%; min-height: 420px; border: 0; border-radius: 26px; background: #0b1020; }

/* ---------- 状态 ---------- */
.kv { list-style: none; }
.kv li { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, .07); }
.kv li:last-child { border-bottom: 0; }
.kv span { font-size: 12px; color: #8b96c6; }
.kv b { font-size: 13px; font-weight: 600; color: #e8ecff; }
.kv b.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px; border: 0; border-radius: 12px; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit; color: #e8ecff;
  background: rgba(255, 255, 255, .07);
  transition: .18s;
}
.btn:hover { background: rgba(255, 255, 255, .12); }
.btn.primary {
  width: 100%;
  background: linear-gradient(135deg, #5c76ff, #8f5bff);
  box-shadow: 0 10px 26px rgba(90, 110, 255, .32);
}
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.msg { margin-top: 10px; font-size: 12.5px; line-height: 1.6; min-height: 4px; }
.msg.ok { color: #57d98a; }
.msg.bad { color: #ff9b9b; }

/* ---------- 日志 ---------- */
.logbox {
  background: #070b17; border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px;
  padding: 13px; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.75; color: #93a2d3;
  white-space: pre-wrap; word-break: break-all;
  max-height: 210px; overflow: auto;
}
.logbox.tall { max-height: 66vh; }
.link { display: inline-block; margin-top: 12px; font-size: 12px; color: #8fa5ff; text-decoration: none; }
.link:hover { color: #b9c8ff; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: #93a0ce; margin-bottom: 12px; }
label:last-child { margin-bottom: 0; }
input, select, textarea {
  width: 100%; padding: 10px 12px;
  font-family: inherit; font-size: 13px; color: #e8ecff;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 10px;
  outline: none; transition: .16s;
}
textarea { resize: vertical; line-height: 1.6; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
input::placeholder, textarea::placeholder { color: #5d6794; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(111, 140, 255, .65);
  box-shadow: 0 0 0 3px rgba(111, 140, 255, .16);
  background: rgba(111, 140, 255, .06);
}
select option { background: #131a33; color: #e8ecff; }
input[type="date"] { color-scheme: dark; }

.sub { margin-top: 20px; padding-top: 18px; border-top: 1px dashed rgba(255, 255, 255, .08); }
.sub h4 { font-size: 12px; font-weight: 600; color: #8b96c6; letter-spacing: 1.4px; margin-bottom: 12px; text-transform: uppercase; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: #7fd4ff; background: rgba(120, 200, 255, .1); padding: 2px 6px; border-radius: 5px; }

.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week label { margin-bottom: 0; }

.actions { display: flex; justify-content: flex-end; padding: 4px 0 20px; }
.actions .btn.primary { width: auto; min-width: 160px; }

/* ---------- 提示条 ---------- */
.alert {
  padding: 12px 15px; border-radius: 12px; margin-bottom: 16px;
  font-size: 13px; line-height: 1.6;
  background: rgba(255, 110, 110, .11);
  border: 1px solid rgba(255, 110, 110, .28);
  color: #ffb3b3;
}
.alert.ok { background: rgba(80, 210, 140, .11); border-color: rgba(80, 210, 140, .3); color: #93ecb9; }

/* ---------- 登录 ---------- */
.login-body { display: grid; place-items: center; padding: 24px; }
.login-card {
  position: relative; width: 340px; max-width: 100%; padding: 32px 28px;
  border-radius: 22px; overflow: hidden;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}
.login-card .halo {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: #6a7bff; filter: blur(80px); opacity: .45;
  top: -130px; right: -90px; pointer-events: none;
}
.login-card h1 { font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
.login-card .sub-t { font-size: 12px; color: #8b96c6; margin: 6px 0 22px; }
.login-card input { margin-bottom: 14px; padding: 12px 14px; }
.login-card .btn { width: 100%; margin-top: 4px; }

/* ---------- 推送规则 ---------- */
.rules { display: flex; flex-direction: column; gap: 9px; }
.rule-row { display: grid; grid-template-columns: 56px 1fr 1fr; align-items: center; gap: 10px; }
.rule-row b { font-size: 13px; color: #cfd7ff; font-weight: 600; }
.rule-row input, .rule-row select { margin-bottom: 0; }
.rule-row input { text-align: center; }

/* ---------- 移动端 ---------- */
@media (max-width: 880px) {
  .grid { grid-template-columns: 1fr; }
  .nav { padding: 13px 18px; }
  main { padding: 18px 16px 60px; }
  .panel { padding: 18px; border-radius: 16px; }
  .week { grid-template-columns: repeat(2, 1fr); }
  .links a { padding: 7px 9px; font-size: 12.5px; }
  .phone iframe { width: 100%; max-width: 390px; }
}
