/* ============================================================
 * 管理后台 v1.7.1：授权码门禁 + 后台专属装饰
 * 沿用 theme.css 黑金变量；阿语 RTL 与手机端均已适配
 * ============================================================ */

/* ---------- 授权码门禁 ---------- */
.admin-gate {
  min-height: 100vh; position: relative; display: grid; place-items: center; padding: 24px;
  overflow-x: clip; /* RTL 下装饰光晕的负 left 会被计入滚动宽度，裁掉避免横向溢出 */
  background:
    radial-gradient(900px 700px at 20% 16%, rgba(199, 150, 72, .16), transparent 62%),
    radial-gradient(700px 620px at 78% 88%, rgba(199, 150, 72, .10), transparent 65%),
    linear-gradient(128deg, #0b0c0f 0%, #111319 46%, #0a0b0e 100%);
}
.gate-glow {
  position: absolute; width: 760px; height: 760px; border-radius: 50%;
  left: -240px; top: -200px; border: 1px solid rgba(199, 150, 72, .14);
  box-shadow: inset 0 0 140px rgba(199, 150, 72, .08); pointer-events: none;
}
.gate-card {
  position: relative; width: min(420px, 100%); padding: 32px 32px 24px;
  border: 1px solid var(--gold-line); border-radius: 14px;
  background: linear-gradient(160deg, rgba(23, 26, 31, .97), rgba(13, 15, 19, .98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}
.gate-brand .brand { gap: 10px; }
.gate-brand .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
.gate-brand .brand-name { font-size: 18px; letter-spacing: 4px; }
.gate-brand .brand-sub .stp { font-size: 15px; }
.gate-brand .brand-sub .pros { font-size: 11.5px; }
.gate-rule { height: 1px; margin: 20px 0; background: linear-gradient(90deg, var(--gold-4), transparent); }
.gate-badge {
  display: inline-block; font-size: 10px; letter-spacing: 2px; color: var(--gold-2);
  border: 1px solid var(--gold-line); border-radius: 999px; padding: 3px 10px;
}
.gate-title { font-size: 22px; color: var(--text-1); margin: 12px 0 6px; letter-spacing: 1px; }
.gate-desc { font-size: 12px; color: var(--text-3); line-height: 1.75; margin-bottom: 12px; }
.gate-note {
  font-size: 11px; color: var(--gold-2); line-height: 1.6;
  border: 1px dashed var(--gold-line); border-radius: 8px;
  padding: 8px 10px; margin-bottom: 18px;
}
.gate-label { display: block; font-size: 11.5px; color: var(--text-2); margin-bottom: 8px; letter-spacing: .5px; }
.gate-input {
  width: 100%; box-sizing: border-box; height: 42px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--bg-2); color: var(--text-1); font-size: 14px;
  letter-spacing: 1.5px; direction: ltr; text-align: left; outline: none;
}
.gate-input:focus { border-color: var(--gold-4); box-shadow: 0 0 0 3px var(--gold-soft); }
.gate-err { min-height: 18px; font-size: 11.5px; color: #f2636f; margin: 8px 0 2px; }
.gate-submit {
  width: 100%; height: 42px; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--gold-grad); color: #171310; font-size: 14px; font-weight: 700; letter-spacing: 2px;
}
.gate-submit:hover { filter: brightness(1.06); }
.gate-foot { text-align: center; margin-top: 16px; font-size: 11.5px; }
.gate-foot a { color: var(--text-3); text-decoration: none; }
.gate-foot a:hover { color: var(--gold-2); }
.gate-lang { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- 后台标识与概览 ---------- */
.admin-badge {
  margin-top: 10px; text-align: center; font-size: 9.5px; letter-spacing: 2px;
  color: var(--gold-2); border: 1px solid var(--gold-line); border-radius: 999px; padding: 3px 0;
}
.admin-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-tile {
  position: relative; padding: 16px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg-2); cursor: pointer; transition: .18s;
}
.admin-tile:hover { border-color: var(--gold-4); transform: translateY(-2px); }
.admin-tile b { display: block; font-size: 13px; color: var(--gold-1); margin-bottom: 6px; }
.admin-tile span { display: block; font-size: 11px; color: var(--text-3); line-height: 1.6; }
.admin-tile i { position: absolute; top: 12px; right: 12px; font-style: normal; color: var(--gold-4); font-size: 16px; }
.admin-k { font-size: 11px; color: var(--text-3); letter-spacing: .5px; margin-bottom: 10px; }
.admin-v { font-size: 17px; color: var(--text-1); font-weight: 600; line-height: 1.4; word-break: break-all; }
.admin-s { font-size: 10.5px; color: var(--text-4); margin-top: 7px; }

html[dir="rtl"] .admin-tile i { right: auto; left: 12px; }
html[dir="rtl"] .gate-glow { display: none; }

/* 登录页低调后台入口 */
.auth-admin { text-align: center; margin-top: 8px; font-size: 11px; }
.auth-admin a { color: var(--text-4); text-decoration: none; letter-spacing: 1px; }
.auth-admin a:hover { color: var(--gold-2); }

@media (max-width: 780px) {
  .gate-card { padding: 26px 20px 20px; }
  .gate-glow { display: none; }
  .admin-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
  
.mt-policy-toggle { display: inline-flex; align-items: center; gap: .75rem; }
.mt-policy-track {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 12px;
}
.mt-policy-track::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
}
.mt-policy-toggle[aria-checked="true"] { color: var(--gold-2); }
.mt-policy-toggle[aria-checked="true"] .mt-policy-track::after {
  inset-inline-start: auto;
  inset-inline-end: 3px;
}
.mt-policy-toggle:disabled { opacity: .55; cursor: not-allowed; }
