/* =========================================================
   Star Engine — 登录 / 注册面板
   深色面板：比页面抬一层，#16181d；输入框内凹 #0e1013
   只依赖 main.css 里的 --blue / --blue-h / --font
   ========================================================= */

/* ---------- 弹窗骨架 ---------- */
.se-auth{
  position:fixed;inset:0;z-index:9997;
  display:flex;align-items:center;justify-content:center;
  padding:24px 16px;overflow-y:auto;
  opacity:0;transition:opacity .18s ease;
}
.se-auth[hidden]{display:none}
.se-auth.is-open{opacity:1}
body.se-auth-open{overflow:hidden}

.se-auth-veil{
  position:fixed;inset:0;background:rgba(0,0,0,.68);
  backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
}

.se-auth-pos{
  position:relative;margin:auto;
  width:100%;max-width:440px;
  display:flex;flex-direction:column;align-items:center;
  transform:translateY(8px);
  transition:transform .22s cubic-bezier(.22,.61,.36,1);
}
.se-auth.is-open .se-auth-pos{transform:none}

/* ---------- 面板 ---------- */
.se-auth-panel{
  position:relative;width:100%;-webkit-tap-highlight-color:transparent;
  background:#16181d;
  border:1px solid rgba(255,255,255,.09);
  border-radius:16px;
  padding:32px;
  box-shadow:0 24px 64px rgba(0,0,0,.62);
}
/* ---------- 品牌 ---------- */
.se-auth-brand{
  display:flex;align-items:center;justify-content:center;gap:8px;
  margin:0 0 28px;
}
.se-auth-brand svg{width:26px;height:26px;fill:#fff;flex:0 0 auto}
.se-auth-brand span{font-size:15px;font-weight:500;letter-spacing:.02em;color:#fff}

/* 面板内链接统一：账户页在 .entry 里，会被 .entry a 的白字下划线接管，这里压回去 */
.se-auth-panel a{text-decoration:none;color:inherit}

/* ---------- 表单 ---------- */
.se-auth-form{margin:0}
.se-auth-form[hidden]{display:none}
.se-auth-field{margin-bottom:20px}

.se-auth-label{
  display:block;margin-bottom:8px;
  font-size:13px;line-height:1.4;color:#b9b9b9;
  transition:color .15s;
}
.se-auth-label em{font-style:normal;color:#e0564a;margin-left:2px}
/* 正在填的那一项，标签跟着亮一下 */
.se-auth-field:focus-within .se-auth-label{color:#fff}
.se-auth-label-row{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.se-auth-label-row .se-auth-label{margin-bottom:8px}
.se-auth-panel .se-auth-forgot{font-size:12.5px;color:#8f8f8f;transition:color .15s}
.se-auth-panel .se-auth-forgot:hover{color:#fff}

.se-auth-input{
  display:block;width:100%;height:44px;
  padding:0 12px;
  background:#0e1013;color:#ececec;
  border:1px solid rgba(255,255,255,.11);
  border-radius:8px;
  font-family:var(--font);font-size:14px;
  /* 这层内阴影一直在：浏览器自动填充会往输入框里刷白底，
     只有它能把白底盖回去。放进 :focus 会被外圈光晕顶掉，所以常驻 */
  box-shadow:0 0 0 1000px #0e1013 inset;
  -webkit-tap-highlight-color:transparent;
  /* background-color 超长过渡：Safari 不吃内阴影遮罩，靠这个把白底永远变不过来 */
  transition:border-color .15s,box-shadow .15s,background-color 9999s ease-out;
}
.se-auth-input::placeholder{color:#5f636b}
.se-auth-input:focus{
  outline:none;border-color:#4a6ae0;background:#0e1013;
  box-shadow:0 0 0 1000px #0e1013 inset,0 0 0 3px rgba(51,88,212,.22);
}
/* 自动填充：四个状态都要罩住，少一个就会在那一态露出白底 */
.se-auth-input:-webkit-autofill,
.se-auth-input:-webkit-autofill:hover,
.se-auth-input:-webkit-autofill:focus,
.se-auth-input:-webkit-autofill:active{
  -webkit-text-fill-color:#ececec;
  -webkit-box-shadow:0 0 0 1000px #0e1013 inset;
  caret-color:#ececec;
}
.se-auth-input:-webkit-autofill:focus{
  -webkit-box-shadow:0 0 0 1000px #0e1013 inset,0 0 0 3px rgba(51,88,212,.22);
}

/* 验证码一行 */
.se-auth-code{display:flex;gap:8px}
.se-auth-code .se-auth-input{flex:1;min-width:0}
.se-auth-send{
  flex:0 0 auto;height:44px;padding:0 16px;
  border:1px solid #3b5bcd;border-radius:8px;background:transparent;
  color:#7b9bff;font-size:13px;line-height:1;
  transition:background .15s,border-color .15s,color .15s;
}
.se-auth-send:hover:not(:disabled){background:rgba(51,88,212,.14);border-color:#4a6ae0}
.se-auth-send:disabled{
  color:#5f636b;border-color:rgba(255,255,255,.1);cursor:not-allowed;
  font-variant-numeric:tabular-nums;
}

/* 记住登录 */
.se-auth-keep{
  display:flex;align-items:center;gap:8px;
  margin:4px 0 20px;font-size:13px;color:#b9b9b9;cursor:pointer;
  user-select:none;
}
.se-auth-keep input{
  appearance:none;-webkit-appearance:none;
  width:16px;height:16px;flex:0 0 auto;margin:0;
  background:#0e1013;border:1px solid rgba(255,255,255,.24);border-radius:4px;
  position:relative;cursor:pointer;transition:background .15s,border-color .15s;
}
.se-auth-keep input:checked{background:var(--blue);border-color:var(--blue)}
.se-auth-keep input:checked::after{
  content:'';position:absolute;left:5px;top:2px;
  width:5px;height:9px;
  border:2px solid #fff;border-top:0;border-left:0;
  transform:rotate(42deg);
}

/* 切换视图 */
.se-auth-swap{margin:0 0 16px;font-size:13px;color:#8f8f8f}
.se-auth-panel .se-auth-swap a{color:#7b9bff;margin-left:2px;transition:color .15s}
.se-auth-panel .se-auth-swap a:hover{color:#a3b8ff}

/* 主按钮 */
.se-auth-btn{
  display:block;width:100%;height:44px;
  background:var(--blue);color:#fff;
  border-radius:8px;font-size:14px;font-weight:600;
  transition:background .15s;
}
.se-auth-btn:hover{background:var(--blue-h)}
.se-auth-btn:disabled{opacity:.55;cursor:not-allowed}

/* ---------- 错误提示 ---------- */
.se-auth-note{
  margin:0 0 20px;padding:10px 12px;
  background:rgba(224,86,74,.1);
  border:1px solid rgba(224,86,74,.3);
  border-radius:8px;
  font-size:12.5px;line-height:1.6;color:#f2a9a1;
}
.se-auth-note[hidden]{display:none}
.se-auth-note.is-ok{
  background:rgba(58,160,110,.1);border-color:rgba(58,160,110,.3);color:#8dd5b0;
}

/* ---------- 说明文字 ---------- */
.se-auth-lead{
  margin:0 0 20px;
  font-size:13px;line-height:1.7;color:#8f8f8f;
}

/* ---------- 底部声明 ---------- */
.se-auth-legal{
  margin:24px 0 0;
  font-size:12px;line-height:1.75;color:#7a7f88;text-align:center;
}
.se-auth-panel .se-auth-legal a{
  color:#8f949d;text-decoration:underline;text-underline-offset:2px;
}
.se-auth-panel .se-auth-legal a:hover{color:#c9c9c9}
.se-auth-panel .se-auth-back{
  display:inline-block;margin-top:2px;
  color:#7b9bff;text-decoration:none;font-size:12.5px;
}
.se-auth-panel .se-auth-back:hover{color:#a3b8ff}

/* ---------- 关闭（面板外圆形） ---------- */
.se-auth-x{
  margin-top:16px;
  width:40px;height:40px;border-radius:50%;
  display:grid;place-items:center;
  background:rgba(255,255,255,.1);color:#fff;
  transition:background .15s;
}
.se-auth-x:hover{background:rgba(255,255,255,.2)}
.se-auth-x svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}

/* =========================================================
   账户页落地态
   ========================================================= */
.se-auth-page{padding:0}
.se-auth-page-inner{width:100%;max-width:440px;margin:0 auto}

.se-auth-page .se-auth-panel{
  width:100%;padding:32px;
  box-shadow:none;
}

/* 未登录时不要那行大标题，直接看表单 */
body.se-auth-landing .page-hero{display:none}
body.se-auth-landing .page-body{padding-top:clamp(40px,7vh,80px)}
body.se-auth-landing .wrap-narrow{max-width:440px}
body.se-auth-landing .entry{color:inherit;font-size:inherit;line-height:inherit}

/* 账户页上的 WooCommerce 提示条，收紧一点 */
body.se-auth-landing .woocommerce-notices-wrapper .woocommerce-error,
body.se-auth-landing .woocommerce-notices-wrapper .woocommerce-message,
body.se-auth-landing .woocommerce-notices-wrapper .woocommerce-info{
  margin:0 0 20px;padding:12px 16px;font-size:13px;line-height:1.6;
}
body.se-auth-landing .woocommerce-error li{margin:0}
body.se-auth-landing .woocommerce-error li+li{margin-top:6px}

/* =========================================================
   移动端
   ========================================================= */
@media (max-width:520px){
  .se-auth{padding:16px 12px;align-items:flex-start}
  .se-auth-pos{margin-top:8vh}
  .se-auth-panel{padding:24px;border-radius:14px}
  .se-auth-brand{margin-bottom:24px}
  .se-auth-legal{font-size:11px}
  /* iOS 点输入框会整页放大，字号到 16px 才不触发 */
  .se-auth-input{font-size:16px}
  .se-auth-code{flex-wrap:nowrap}
  .se-auth-send{padding:0 12px;font-size:12.5px}
  body.se-auth-landing .page-body{padding-top:24px}
  body.se-auth-landing .se-auth-panel{padding:24px}
  body.se-auth-landing .wrap{padding:0 16px}
}

@media (prefers-reduced-motion:reduce){
  .se-auth,.se-auth-pos{transition:none}
}

/* 页头用 button 承载图标时，去掉浏览器默认内边距 */
button.head-icon{padding:0}
