/* =========================================================
   授权门禁 · 登录页 · 授权管理面板
   配色沿用主界面：藏青顶栏 + 鎏金强调
   ========================================================= */

.auth-page {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1100px 620px at 18% 8%, rgba(217,180,94,.16), transparent 60%),
    radial-gradient(900px 560px at 88% 92%, rgba(217,180,94,.10), transparent 62%),
    linear-gradient(140deg, #121a24 0%, #1b2430 46%, #2a2718 100%);
  padding: 24px; overflow: auto;
}
.auth-page[hidden] { display: none; }
.auth-page__bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 30%, transparent 78%);
}

.auth-card {
  position: relative; width: 100%; max-width: 430px;
  background: rgba(255,255,255,.97);
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(0,0,0,.42), 0 0 0 1px rgba(217,180,94,.22);
  padding: 34px 34px 26px;
  animation: authIn .32s cubic-bezier(.2,.7,.3,1);
}
@keyframes authIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.auth-card__top { text-align: center; margin-bottom: 22px; }
.auth-card__logo {
  width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 12px;
  display: grid; place-items: center; font-size: 24px; font-family: "SimSun", serif; font-weight: 700;
  color: #2a2110; background: linear-gradient(140deg, #e3c274, #b58c2b);
  box-shadow: 0 6px 18px rgba(217,180,94,.36);
}
.auth-card__title { font-size: 18px; font-weight: 700; color: #1b2430; letter-spacing: .5px; }
.auth-card__sub { margin-top: 7px; font-size: 12px; color: #6b7380; line-height: 1.7; }
.auth-card__tag {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 11px;
  font-size: 11px; color: #8a6d1f; background: #f6efd9; border: 1px solid #e8d9a8;
  padding: 3px 10px; border-radius: 20px;
}
.auth-card__tag i { width: 5px; height: 5px; border-radius: 50%; background: #b58c2b; }

.auth-field { margin-bottom: 14px; }
.auth-field > span { display: block; font-size: 12px; color: #4c5460; margin-bottom: 6px; font-weight: 500; }
.auth-field > span b { color: #b58c2b; font-weight: 600; }
.auth-field input {
  width: 100%; height: 40px; padding: 0 12px; font-size: 13.5px; font-family: inherit;
  border: 1px solid #d7dae0; border-radius: 7px; background: #fbfbfc; color: #23272e;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-field input:focus {
  outline: none; border-color: #c9a44a; background: #fff;
  box-shadow: 0 0 0 3px rgba(217,180,94,.18);
}
.auth-field input::placeholder { color: #b3b9c2; }

.auth-btn {
  width: 100%; height: 42px; border: none; border-radius: 7px; cursor: pointer;
  font-size: 14px; font-weight: 700; color: #2a2110; font-family: inherit;
  background: linear-gradient(135deg, #ddb95f, #b58c2b);
  box-shadow: 0 4px 14px rgba(217,180,94,.34);
  transition: filter .15s, transform .08s;
}
.auth-btn:hover { filter: brightness(1.07); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn[disabled] { opacity: .6; cursor: not-allowed; }

.auth-msg {
  min-height: 20px; margin-top: 12px; font-size: 12px; text-align: center;
  color: #b4462f; line-height: 1.6;
}
.auth-msg--ok { color: #2f7d54; }
.auth-msg--hint { color: #8a6d1f; }

.auth-foot {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed #e2e4e9;
  font-size: 11px; color: #8b93a0; line-height: 1.8; text-align: center;
}
.auth-foot b { color: #6b7380; }

/* ---------- 顶栏授权信息 ---------- */
.auth-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 8px;
  border-radius: 20px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  font-size: 11.5px; color: #dfe4ea; cursor: default;
}
.auth-chip__dot { width: 6px; height: 6px; border-radius: 50%; background: #4fc38a; box-shadow: 0 0 6px #4fc38a; }
.auth-chip__role {
  font-size: 10px; padding: 1px 6px; border-radius: 10px; margin-left: 2px;
  background: rgba(217,180,94,.22); color: #e6c979; border: 1px solid rgba(217,180,94,.35);
}

/* ---------- 授权管理面板 ---------- */
.amodal {
  position: fixed; inset: 0; z-index: 10050; display: none;
  align-items: center; justify-content: center; background: rgba(16,22,30,.55); padding: 24px;
}
.amodal.is-open { display: flex; }
.amodal__box {
  width: 100%; max-width: 780px; max-height: 88vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.34); overflow: hidden;
}
.amodal__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: linear-gradient(100deg, #1b2430, #33301f); color: #fff;
}
.amodal__hd h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: .5px; }
.amodal__hd span { font-size: 11.5px; color: #a7b0bd; }
.amodal__close {
  background: transparent; border: none; color: #cfd6df; font-size: 20px; cursor: pointer;
  line-height: 1; padding: 2px 6px; border-radius: 5px;
}
.amodal__close:hover { background: rgba(255,255,255,.12); color: #fff; }
.amodal__bd { padding: 16px 18px 20px; overflow: auto; }

.amodal__tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.amodal__tab {
  padding: 6px 14px; border-radius: 6px; font-size: 12.5px; cursor: pointer;
  border: 1px solid #dfe2e7; background: #f7f8fa; color: #4c5460; font-family: inherit;
}
.amodal__tab.is-on { background: linear-gradient(135deg, #ddb95f, #b58c2b); color: #2a2110; border-color: transparent; font-weight: 600; }

.atable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.atable th, .atable td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #eef0f3; }
.atable th { background: #f7f8fa; color: #6b7380; font-weight: 600; font-size: 11.5px; }
.atable tr.is-off td { color: #a8aeb8; text-decoration: line-through; }
.atable .arow-act { white-space: nowrap; text-align: right; }
.arole {
  display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px;
  background: #eef1f5; color: #5b636f;
}
.arole--admin { background: #f6efd9; color: #8a6d1f; }

.aform { display: grid; grid-template-columns: 1.1fr 1.3fr .8fr auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.aform label { display: block; font-size: 11.5px; color: #4c5460; margin-bottom: 5px; }
.aform input, .aform select {
  width: 100%; height: 36px; padding: 0 10px; font-size: 13px; font-family: inherit;
  border: 1px solid #d7dae0; border-radius: 6px; background: #fbfbfc; color: #23272e;
}
.aform input:focus, .aform select:focus { outline: none; border-color: #c9a44a; box-shadow: 0 0 0 3px rgba(217,180,94,.16); }
.anote { font-size: 11.5px; color: #8b93a0; margin-bottom: 12px; line-height: 1.7; }
.anote b { color: #b4462f; }
.aempty { text-align: center; color: #a8aeb8; font-size: 12.5px; padding: 26px 0; }
.alog { font-size: 11.5px; }
.alog td:first-child { white-space: nowrap; color: #8b93a0; }
.abtn {
  height: 36px; padding: 0 16px; border: none; border-radius: 6px; cursor: pointer;
  font-size: 12.5px; font-family: inherit; background: linear-gradient(135deg, #ddb95f, #b58c2b);
  color: #2a2110; font-weight: 700; white-space: nowrap;
}
.abtn--line { background: #fff; border: 1px solid #d7dae0; color: #4c5460; font-weight: 500; }
.abtn--line:hover { background: #f3f4f6; }
.abtn--danger { background: #fff; border: 1px solid #e8c3ba; color: #b4462f; font-weight: 500; }
.abtn--danger:hover { background: #fbe6e1; }
