:root {
  --bg: #eef5fc;
  --panel: #fff;
  --card: #fff;
  --line: #d7e6f5;
  --text: #1a2332;
  --muted: #6b7c90;
  --accent: #2b7cff;
  --ink: #2b7cff;
  --ok: #1f9a57;
  --danger: #e04b4b;
  --info: #2b7cff;
  --warn: #d48a1a;
  --shadow: 0 8px 24px rgba(80, 130, 190, .08);
  --radius: 14px;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
#app { flex: 1; display: flex; flex-direction: column; min-height: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
.app-shell { min-height: 100%; flex: 1; display: flex; }
.side {
  width: 228px; flex: 0 0 228px; background: #fff;
  border-right: 1px solid var(--line); padding: 22px 14px 14px;
  display: flex; flex-direction: column; min-height: 100%;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 24px; }
.brand .login-cloud { width: 32px; height: 22px; flex: 0 0 auto; }
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.brand h1 { margin: 0; font-size: 18px; font-weight: 700; color: #1c6fe8; letter-spacing: .02em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav a, .nav button.navlink {
  appearance: none; border: 0; background: transparent; color: #5a6b80; text-align: left;
  padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.nav a.active, .nav button.navlink.active {
  background: #e8f2ff; color: #2b7cff; font-weight: 600;
}
.nav a:hover, .nav button.navlink:hover { background: #f3f8fd; color: #1a2332; text-decoration: none; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.acct { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; }
.acct-av {
  width: 32px; height: 32px; border-radius: 8px; background: #e8f2ff; color: #2b7cff;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: 0 0 32px;
}
.acct-meta { min-width: 0; }
.acct-meta b {
  display: block; color: var(--text); font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.acct-meta span { color: var(--muted); font-size: 12px; }
.logout {
  display: block; text-align: center; color: #5a6b80; font-size: 13px;
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: #f7fbff;
}
.logout:hover { background: #e8f2ff; color: #2b7cff; text-decoration: none; }
.main { flex: 1; padding: 28px 32px; min-width: 0; }
.topbar { margin-bottom: 20px; }
.topbar h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 12px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
.stat b { display: block; font-size: 28px; margin-top: 6px; color: var(--text); font-weight: 650; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 13px; }
.btn {
  appearance: none; border: 0; cursor: pointer; border-radius: 10px; padding: 9px 16px; font-weight: 600;
  background: linear-gradient(90deg, #5eb2ff, #2b7cff); color: #fff;
  box-shadow: 0 6px 14px rgba(43, 124, 255, .22);
}
.btn:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.btn.ghost { background: #fff; color: #3d5a80; border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: #f7fbff; color: #2b7cff; }
.btn.danger { background: #fff; color: var(--danger); border: 1px solid #f3d0d0; box-shadow: none; }
.btn.ok { background: var(--ok); color: #fff; box-shadow: none; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: #5a6b80; }
.field input, .field select, .field textarea {
  background: #fff; border: 1px solid var(--line); color: var(--text); border-radius: 8px;
  padding: 10px 12px; outline: none;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #7eb6ff; box-shadow: 0 0 0 3px rgba(43, 124, 255, .12);
}
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.switch input { width: 40px; height: 22px; accent-color: var(--accent); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { color: var(--muted); font-weight: 500; }
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #e8f2ff; color: #3d5a80; }
.badge.ok { background: #e5f6ea; color: var(--ok); }
.badge.warn { background: #fff4e5; color: var(--warn); }
.badge.err { background: #fdecec; color: var(--danger); }
.badge.info { background: #e8f2ff; color: var(--info); }
.empty { padding: 40px 12px; text-align: center; color: var(--muted); }
.auth-wrap {
  flex: 1; min-height: 0; display: grid; place-items: center; padding: 48px 20px 24px;
  background: var(--bg);
}
.auth-card {
  width: min(400px, 100%);
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 10px 40px rgba(31, 28, 25, .06); padding: 40px 32px 32px;
}
.auth-head { margin-bottom: 24px; text-align: center; }
.auth-head h2 {
  font-size: 22px; margin: 0; font-weight: 650; line-height: 1.4; letter-spacing: .02em;
}
.auth-head p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-card .btn { width: 100%; padding: 11px 16px; margin-top: 6px; border-radius: 10px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .field label { font-size: 13px; color: #6d675f; }
.auth-card .field input {
  padding: 11px 12px; border-radius: 10px; background: #faf8f5;
}
.auth-card .field input:focus { background: #fff; border-color: #c9c2b6; }
.auth-note { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.6; }
.site-foot {
  flex-shrink: 0; text-align: center; color: var(--muted); font-size: 12px;
  padding: 8px 16px 22px; line-height: 1.8;
}
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--text); text-decoration: none; }
.site-foot .sep { margin: 0 8px; opacity: .45; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: #f3eee8; border-radius: 10px; padding: 4px; margin-bottom: 18px;
}
.auth-tabs button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px;
}
.auth-tabs button.on { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.toast-box { position: fixed; right: 18px; top: 18px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #fff; border: 1px solid var(--line); padding: 10px 14px; border-radius: 10px; min-width: 220px; box-shadow: var(--shadow); }
.toast.err { border-color: #f3d0d0; color: var(--danger); }
.modal-mask { position: fixed; inset: 0; background: rgba(26, 35, 50, .28); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { width: min(720px, 100%); background: #fff; border-radius: 16px; border: 1px solid var(--line); padding: 22px; box-shadow: 0 18px 50px rgba(80,130,190,.18); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #e8f2ff; color: #2b7cff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.hidden { display: none !important; }
.kicker { font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.help { font-size: 12px; color: var(--muted); line-height: 1.6; }
.shop-card h3 { margin: 0 0 8px; }
.shop-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.userchip { display: flex; align-items: center; gap: 10px; }
@media (max-width: 960px) {
  .auth-card, .grid.stats { grid-template-columns: 1fr; }
  .app-shell { flex-direction: column; }
  .side { width: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--line); min-height: 0; }
  .nav { flex-direction: row; overflow: auto; flex: none; }
  .side-foot { display: flex; align-items: center; gap: 10px; border-top: 0; padding-top: 10px; }
  .acct { flex: 1; padding: 0 8px; }
  .logout { flex: 0 0 auto; }
  .main { padding: 18px; }
}

body.auth-page {
  background: #d7ecff url("/assets/img/login-bg.jpg") center / cover no-repeat;
  color: #1a2332;
}
body.auth-page #app { background: transparent; }
body.auth-page .site-foot { color: rgba(70, 96, 128, .72); padding: 6px 16px 18px; }
body.auth-page .site-foot a { color: inherit; }
.login-screen {
  flex: 1; display: flex; flex-direction: column; min-height: 0; width: 100%;
}
.login-top {
  width: min(1120px, 100%); margin: 0 auto; padding: 28px 40px 0;
}
.login-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 700; color: #1c6fe8; letter-spacing: .02em;
}
.login-cloud { width: 32px; height: 22px; display: block; }
.login-mid {
  flex: 1; width: min(1120px, 100%); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; padding: 24px 40px 56px;
}
.login-slogan { max-width: 460px; }
.login-slogan h1 {
  margin: 0; font-size: 34px; font-weight: 700; letter-spacing: .04em; color: #1a2332;
}
.login-slogan em {
  font-style: normal;
  background: linear-gradient(90deg, #6b7dff, #b56bff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
}
.login-slogan p { margin: 12px 0 0; color: #5a6b80; font-size: 14px; letter-spacing: .08em; }
.login-card {
  width: min(400px, 100%); background: #fff; border-radius: 16px;
  box-shadow: 0 18px 50px rgba(80, 130, 190, .18); padding: 28px 32px 32px;
}
.login-tab { margin-bottom: 22px; }
.login-tab .on {
  display: inline-block; color: #2b7cff; font-weight: 700; font-size: 15px;
  padding-bottom: 8px; border-bottom: 2px solid #2b7cff;
}
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-input {
  width: 100%; height: 42px; border: 1px solid #cfe0f5; border-radius: 8px;
  padding: 0 12px; background: #fff; color: #1a2332; outline: none; font-size: 14px;
}
.login-input:focus { border-color: #7eb6ff; box-shadow: 0 0 0 3px rgba(43, 124, 255, .12); }
.login-pass { position: relative; }
.login-pass .login-input { padding-right: 42px; }
.login-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238aa0b8' stroke-width='1.6'%3E%3Cpath d='M1.5 9s3-5.5 7.5-5.5S16.5 9 16.5 9 13.5 14.5 9 14.5 1.5 9 1.5 9z'/%3E%3Ccircle cx='9' cy='9' r='2.2'/%3E%3C/svg%3E") center / 18px no-repeat;
  cursor: pointer;
}
.login-eye.on {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%232b7cff' stroke-width='1.6'%3E%3Cpath d='M1.5 9s3-5.5 7.5-5.5S16.5 9 16.5 9 13.5 14.5 9 14.5 1.5 9 1.5 9z'/%3E%3Ccircle cx='9' cy='9' r='2.2'/%3E%3Cpath d='M3 15 L15 3'/%3E%3C/svg%3E");
}
.login-submit {
  appearance: none; border: 0; cursor: pointer; height: 42px; margin-top: 6px;
  border-radius: 21px; color: #fff; font-size: 15px; font-weight: 600;
  background: linear-gradient(90deg, #5eb2ff 0%, #2b7cff 100%);
  box-shadow: 0 8px 18px rgba(43, 124, 255, .28);
}
.login-submit:hover { filter: brightness(1.05); }
.cookie-bind {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(135deg, #f7fbff, #fff);
}
.cookie-bind b { display: block; font-size: 15px; margin-bottom: 4px; }
.cookie-bind p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.cookie-status {
  margin: 0 0 14px; padding: 8px 12px; border-radius: 10px;
  background: #fff7e8; color: #b66a00; font-size: 12px;
}
.cookie-status.ok { background: #e8f7ee; color: var(--ok); }
.plugin-ticket { margin-bottom: 14px; background: linear-gradient(135deg, #fff, #f7fbff); }
.plugin-help { margin-bottom: 14px; }
.plugin-help .help-steps { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.plugin-help code { background: #e8f2ff; color: #2b7cff; padding: 1px 6px; border-radius: 6px; font-size: 12px; }
.plugin-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 10px; }
.plugin-code {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 180px; padding: 10px 16px;
  border-radius: 12px; background: #e8f2ff; color: #2b7cff;
  font-size: 22px; font-weight: 800; letter-spacing: .08em;
}
.mt-login-modal { width: min(900px, 100%); padding: 0; overflow: hidden; }
.mt-login-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.mt-login-head h3 { margin: 0; font-size: 16px; }
.mt-x {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--muted); width: 32px; height: 32px;
}
.mt-login-grid { display: grid; grid-template-columns: 320px 1fr; min-height: 430px; }
.mt-login-side { padding: 24px 22px; background: #f7fbff; border-right: 1px solid var(--line); }
.step-list { display: grid; grid-template-columns: 28px 1fr; gap: 14px 10px; margin-bottom: 18px; }
.step-list span {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: #e8f2ff; color: #2b7cff; font-weight: 700;
}
.step-list p { margin: 3px 0 0; font-size: 14px; color: var(--text); line-height: 1.5; }
.mt-win { display: flex; flex-direction: column; background: #eef5fc; }
.mt-win-bar {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px;
  background: #fff; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.mt-win-bar em { font-style: normal; margin-left: 8px; }
.mt-dot { width: 8px; height: 8px; border-radius: 50%; background: #d7e6f5; display: inline-block; }
.mt-win-body { flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 12px; padding: 26px; text-align: center; }
.mt-win-logo {
  width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(180deg, #ffd15c, #ffc107);
  color: #7a4a00; display: grid; place-items: center; font-weight: 800; font-size: 13px; margin: 0 auto 4px;
}
.mt-win-body > p { margin: 0 0 4px; color: var(--text); font-weight: 600; }
.mt-cookie-field { text-align: left; margin: 8px 0 0; }
.mt-cookie-field textarea { min-height: 118px; }
@media (max-width: 860px) {
  .mt-login-grid { grid-template-columns: 1fr; }
  .mt-login-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .cookie-bind { align-items: stretch; flex-direction: column; }
}
@media (max-width: 860px) {
  .login-top, .login-mid { padding-left: 20px; padding-right: 20px; }
  .login-mid { flex-direction: column; justify-content: center; text-align: center; }
  .login-slogan h1 { font-size: 26px; }
  .login-card { width: min(400px, 100%); }
}
