/* ============================================================
   RNE Admin 登录页 —— Apple Design Language
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------- 背景层 ---------------- */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f7 100%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #0071e3 0%, transparent 70%);
  top: -200px;
  right: -150px;
  animation: floatA 14s ease-in-out infinite alternate;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #5ac8fa 0%, transparent 70%);
  bottom: -220px;
  left: -160px;
  opacity: 0.08;
  animation: floatB 18s ease-in-out infinite alternate;
}

@keyframes floatA {
  from { transform: translate(0, 0); }
  to   { transform: translate(-40px, 50px); }
}

@keyframes floatB {
  from { transform: translate(0, 0); }
  to   { transform: translate(50px, -40px); }
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ---------------- 登录卡片 ---------------- */

.login-wrap {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  padding: 44px 40px 28px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.08),
    0 2px 12px rgba(0, 0, 0, 0.04);
  animation: cardIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------------- 品牌 ---------------- */

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.logo-mark {
  display: inline-block;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 6px;
  padding-left: 6px;
  color: #1d1d1f;
}

.logo-sub {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 4px;
  color: #86868b;
  padding-left: 4px;
}

.login-title {
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #1d1d1f;
}

.login-desc {
  text-align: center;
  font-size: 13px;
  color: #86868b;
  margin-top: 8px;
  margin-bottom: 30px;
  letter-spacing: 0.5px;
}

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

.field {
  display: block;
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 12px;
  color: #86868b;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: #86868b;
  transition: color 0.2s;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 48px;
  background: #ffffff;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  padding: 0 14px 0 42px;
  color: #1d1d1f;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap input::placeholder {
  color: #86868b;
}

.input-wrap input:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.input-wrap input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: #0071e3;
}

/* ---------------- 警告条 ---------------- */

.alert {
  background: rgba(255, 59, 48, 0.06);
  border: 1px solid rgba(255, 59, 48, 0.2);
  color: #ff3b30;
  font-size: 13px;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ---------------- 蓝色按钮（Apple风格） ---------------- */

.btn-gold {
  width: 100%;
  height: 50px;
  margin-top: 6px;
  border: none;
  border-radius: 980px;
  cursor: pointer;
  background: #0071e3;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.25s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-gold:hover {
  background: #0077ed;
  box-shadow: 0 4px 20px rgba(0, 113, 227, 0.35);
}

.btn-gold:active {
  transform: scale(0.98);
}

.btn-gold:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

.btn-gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.6s;
}

.btn-gold:hover::after {
  left: 130%;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------------- 页脚 ---------------- */

.login-foot {
  margin-top: 26px;
  text-align: center;
  font-size: 11px;
  color: #86868b;
  letter-spacing: 0.5px;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 460px) {
  .login-card {
    padding: 36px 26px 24px;
  }
  .logo-mark {
    font-size: 28px;
  }
}

.logo-img {
 width: 38px;
 height: 38px;
 border-radius: 10px;
 vertical-align: middle;
 margin-right: 12px;
 margin-bottom: 3px;
 box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #86868b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}
.toggle-pw:hover {
  background: rgba(0,0,0,0.05);
  color: #1d1d1f;
}
.toggle-pw svg {
  width: 18px;
  height: 18px;
}
.input-wrap {
  position: relative;
}
