:root{
  --ink:#111827;
  --ink-2:#334155;
  --muted:#64748b;
  --muted-2:#94a3b8;
  --line:rgba(124,58,237,.14);
  --line-strong:rgba(124,58,237,.28);
  --paper:#ffffff;
  --paper-2:#fbfaff;
  --wash:#fbf7ff;
  --green:#7c3aed;
  --green-2:#2563eb;
  --copper:#7c3aed;
  --copper-2:#f5f3ff;
  --danger:#b91c1c;
  --shadow-xs:0 1px 2px rgba(31,41,51,.045);
  --shadow-sm:0 20px 50px rgba(15,23,42,.06);
  --shadow-md:0 24px 60px rgba(15,23,42,.10);
}

*,*::before,*::after{box-sizing:border-box;}
html,body{min-height:100%;margin:0;}
body{
  color:var(--ink);
  background:
    linear-gradient(180deg,#ffffff 0,#fbf7ff 52%,#f8fbff 100%);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  letter-spacing:0;
}
a{text-decoration:none;color:inherit;}
button,input{font:inherit;}

.auth-shell{min-height:100vh;display:flex;flex-direction:column;}
.auth-nav{
  height:64px;
  background:rgba(255,255,255,.94);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(18px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 28px;
  position:sticky;
  top:0;
  z-index:20;
}
.auth-brand{display:flex;align-items:center;gap:2px;min-width:0;}
.auth-brand img{width:40px;height:40px;object-fit:contain;flex-shrink:0;}
.auth-brand strong{display:block;font-size:15px;line-height:1.15;color:var(--ink);}
.auth-brand span{display:block;font-size:12px;line-height:1.15;color:var(--muted);}
.auth-nav-links{display:flex;align-items:center;gap:8px;}
.auth-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:0 12px;
  border-radius:8px;
  color:#485463;
  font-size:13px;
  font-weight:720;
  transition:all .15s;
  white-space:nowrap;
}
.auth-link:hover{background:#f5f3ff;color:var(--green);}
.auth-link.primary{
  background:linear-gradient(135deg,var(--green),var(--green-2));
  border:0;
  color:#fff;
  box-shadow:0 12px 26px rgba(124,58,237,.22);
}
.auth-link.primary:hover{color:#fff;transform:translateY(-1px);}

.auth-main{
  width:min(1160px,calc(100vw - 32px));
  margin:0 auto;
  flex:1;
  display:grid;
  grid-template-columns:minmax(360px,.82fr) minmax(420px,1fr);
  gap:34px;
  align-items:center;
  padding:38px 0 42px;
}
.auth-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:var(--shadow-md);
  padding:28px;
}
.auth-kicker{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:26px;
  border:1px solid #cfe0e5;
  background:#f5f3ff;
  color:var(--green);
  border-radius:999px;
  padding:0 10px;
  font-size:12px;
  font-weight:800;
}
.auth-title{font-size:26px;line-height:1.22;margin:16px 0 8px;font-weight:880;color:var(--ink);}
.auth-sub{margin:0 0 22px;color:var(--muted);font-size:13.5px;line-height:1.7;}
.auth-form{display:flex;flex-direction:column;gap:14px;}
.field{display:flex;flex-direction:column;gap:7px;}
.field-row{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.field label,.field-label{font-size:12.5px;font-weight:760;color:var(--ink-2);}
.input-wrap{
  height:44px;
  border:1.5px solid var(--line);
  border-radius:14px;
  background:#fff;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 12px;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
.input-wrap:focus-within{border-color:var(--green);box-shadow:0 0 0 4px rgba(124,58,237,.10);}
.input-wrap iconify-icon{font-size:18px;color:#8b98a2;flex-shrink:0;}
.input-wrap input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--ink);
  font-size:14px;
}
.input-wrap input::placeholder{color:#9aa6af;}
.icon-btn{
  width:28px;
  height:28px;
  border:0;
  background:transparent;
  color:#82909b;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:7px;
  cursor:pointer;
  flex-shrink:0;
}
.icon-btn:hover{background:#f5f3ff;color:var(--green);}
.auth-mini-link{font-size:12.5px;color:var(--green);font-weight:760;}
.auth-mini-link:hover{text-decoration:underline;}
.auth-options{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.check-line{display:flex;align-items:flex-start;gap:8px;color:var(--muted);font-size:12.5px;line-height:1.55;}
.check-line input{width:16px;height:16px;margin:2px 0 0;accent-color:var(--green);flex-shrink:0;}
.submit-btn{
  height:44px;
  border:0;
  border-radius:14px;
  background:linear-gradient(135deg,var(--green),var(--green-2));
  color:#fff;
  font-weight:820;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  box-shadow:0 12px 26px rgba(124,58,237,.22);
  transition:all .18s;
}
.submit-btn:hover{transform:translateY(-1px);}
.submit-btn:disabled{opacity:.55;cursor:not-allowed;transform:none;}
.auth-divider{display:flex;align-items:center;gap:12px;color:var(--muted-2);font-size:12px;margin:4px 0;}
.auth-divider::before,.auth-divider::after{content:"";height:1px;background:var(--line);flex:1;}
.social-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.social-btn{
  height:40px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  color:var(--ink-2);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:13px;
  font-weight:760;
  cursor:pointer;
}
.social-btn:hover{border-color:var(--line-strong);background:#f5f3ff;color:var(--green);}
.auth-foot{margin:18px 0 0;text-align:center;color:var(--muted);font-size:13px;}
.auth-foot a{color:var(--green);font-weight:820;}
.form-msg{
  display:none;
  border-radius:14px;
  padding:10px 12px;
  font-size:12.5px;
  line-height:1.5;
}
.form-msg.show{display:block;}
.form-msg.error{background:#fff4f4;color:var(--danger);border:1px solid #ffd0d0;}
.form-msg.success{background:#f0f8f4;color:#166534;border:1px solid #c9ead5;}
.password-meter{height:6px;border-radius:999px;background:#edf2f3;overflow:hidden;}
.password-meter span{display:block;height:100%;width:0;background:#cbd5dc;transition:width .2s,background .2s;}
.password-hint{font-size:12px;color:var(--muted);}

.auth-method-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:5px;
  margin:2px 0 16px;
  border:1px solid rgba(124,58,237,.13);
  border-radius:18px;
  background:linear-gradient(135deg,#f8fbff,#fbf7ff);
}
.auth-method-tabs button{
  min-height:42px;
  border:0;
  border-radius:14px;
  background:transparent;
  color:#64748b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:12.5px;
  font-weight:860;
  cursor:pointer;
  transition:all .16s;
}
.auth-method-tabs button iconify-icon{
  font-size:18px;
}
.auth-method-tabs button:hover{
  color:#6366f1;
  background:rgba(255,255,255,.72);
}
.auth-method-tabs button.active{
  color:#fff;
  background:linear-gradient(135deg,#7c3aed,#2563eb);
  box-shadow:0 12px 26px rgba(79,70,229,.22);
}
.auth-login-panel{
  display:none;
}
.auth-login-panel.active{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.wechat-login-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  padding:20px;
  border:1px solid rgba(124,58,237,.14);
  border-radius:22px;
  background:
    radial-gradient(circle at 20% 0%,rgba(219,234,254,.52),rgba(219,234,254,0) 34%),
    radial-gradient(circle at 92% 8%,rgba(237,233,254,.52),rgba(237,233,254,0) 34%),
    linear-gradient(180deg,#fff,#fbfaff);
}
.wechat-qr-box{
  position:relative;
  width:220px;
  height:220px;
  padding:10px;
  border-radius:28px;
  border:1px solid rgba(196,181,253,.7);
  background:#fff;
  box-shadow:0 20px 46px rgba(79,70,229,.12);
}
.wechat-qr-box img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  border-radius:20px;
}
.wechat-qr-loading{
  position:absolute;
  inset:10px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:20px;
  color:#6366f1;
  background:#f8fbff;
  font-size:13px;
  font-weight:850;
}
.wechat-login-copy{
  text-align:center;
}
.wechat-login-copy strong{
  display:block;
  color:#0f172a;
  font-size:15px;
  font-weight:900;
}
.wechat-login-copy span{
  display:block;
  margin-top:6px;
  color:#64748b;
  font-size:12.5px;
  line-height:1.6;
}
.wechat-login-copy span[data-status="success"]{color:#047857;}
.wechat-login-copy span[data-status="error"]{color:#b91c1c;}
.wechat-login-actions{
  width:100%;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.code-wrap{
  padding-right:6px;
}
.code-btn{
  min-width:96px;
  height:32px;
  border:1px solid rgba(124,58,237,.18);
  border-radius:11px;
  color:#6366f1;
  background:#f5f3ff;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}
.code-btn:hover{
  border-color:rgba(124,58,237,.34);
  background:#eef2ff;
}
.code-btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}

.auth-side{
  border:1px solid var(--line);
  border-radius:24px;
  background:#fff;
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.side-top{padding:18px 18px 0;}
.side-window{
  border:1px solid #dbe7ea;
  border-radius:8px;
  overflow:hidden;
  background:#f9fbfc;
}
.side-bar{
  height:42px;
  border-bottom:1px solid #dbe7ea;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:0 12px;
}
.side-brand{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:840;color:var(--ink);}
.side-brand img{width:22px;height:22px;object-fit:contain;}
.side-pill{font-size:11px;color:var(--green);border:1px solid #cfe0e5;background:#f5fafb;border-radius:999px;padding:3px 8px;font-weight:780;}
.side-body{display:grid;grid-template-columns:154px 1fr;min-height:326px;}
.side-rail{border-right:1px solid #e5eef1;background:#fbfdfe;padding:12px;}
.rail-new{
  height:32px;border-radius:8px;background:var(--green);color:#fff;display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;font-weight:820;margin-bottom:12px;
}
.rail-step{height:32px;display:flex;align-items:center;gap:8px;color:#667580;font-size:12px;border-radius:8px;padding:0 8px;margin-bottom:5px;}
.rail-step span{width:18px;height:18px;border-radius:50%;background:#eef3f4;color:#60717a;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:820;}
.rail-step.active{background:#edf6f8;color:var(--green);font-weight:820;}
.rail-step.active span{background:var(--green);color:#fff;}
.side-content{padding:14px;}
.side-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.side-head strong{font-size:15px;color:var(--ink);}
.side-head small{display:block;margin-top:3px;color:var(--muted);font-size:11.5px;}
.side-add{height:30px;border:1px solid #cfe0e5;background:#fff;color:var(--green);border-radius:8px;padding:0 9px;font-size:12px;font-weight:820;display:flex;align-items:center;gap:5px;}
.side-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px;}
.side-stat{border:1px solid #e1ebee;background:#fff;border-radius:8px;padding:9px;}
.side-stat span{display:block;color:var(--green);font-weight:900;font-size:18px;line-height:1;}
.side-stat small{display:block;margin-top:5px;color:#71808a;font-size:10.5px;white-space:nowrap;}
.side-list{display:flex;flex-direction:column;gap:8px;}
.side-item{border:1px solid #e1ebee;background:#fff;border-radius:8px;padding:10px;display:flex;align-items:center;gap:9px;}
.side-item iconify-icon{color:#a5b2ba;font-size:17px;}
.side-item strong{display:block;font-size:12.5px;color:var(--ink);}
.side-item small{display:block;margin-top:2px;font-size:11px;color:var(--muted);}
.side-item .tag{margin-left:auto;border-radius:999px;background:#f4ebdf;color:#8b5d24;padding:3px 7px;font-size:10px;font-weight:820;white-space:nowrap;}
.side-bottom{padding:14px 18px 18px;}
.side-note{border:1px solid #e1ebee;background:#fbfdfe;border-radius:8px;padding:12px;display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
.note-cell strong{display:block;color:var(--ink);font-size:13px;}
.note-cell span{display:block;margin-top:3px;color:var(--muted);font-size:11.5px;line-height:1.4;}

@media(max-width:920px){
  .auth-nav{padding:0 16px;}
  .auth-nav-links .hide-sm{display:none;}
  .auth-main{grid-template-columns:1fr;gap:18px;padding:24px 0 32px;}
  .auth-side{order:-1;}
  .side-body{grid-template-columns:1fr;}
  .side-rail{display:none;}
}

@media(max-width:560px){
  .auth-main{width:calc(100vw - 24px);}
  .auth-card{padding:20px;}
  .auth-title{font-size:23px;}
  .auth-options{align-items:flex-start;flex-direction:column;}
  .social-row,.side-stats,.side-note{grid-template-columns:1fr;}
  .auth-method-tabs{grid-template-columns:1fr;}
  .wechat-login-actions{grid-template-columns:1fr;}
  .auth-link{padding:0 9px;}
}

body[data-auth-page="login"] .auth-main{
  width:min(520px,calc(100vw - 36px));
  grid-template-columns:minmax(0,1fr);
  justify-content:center;
}

body[data-auth-page="register"] .auth-main{
  width:min(520px,calc(100vw - 36px));
  grid-template-columns:minmax(0,1fr);
  justify-content:center;
}

/* Admin login: focused security entry, not a marketing preview. */
body[data-auth-page="admin"]{
  background:
    radial-gradient(circle at 20% 8%,rgba(219,234,254,.64),rgba(219,234,254,0) 30%),
    radial-gradient(circle at 78% 14%,rgba(237,233,254,.54),rgba(237,233,254,0) 28%),
    linear-gradient(180deg,#ffffff 0%,#f8fbff 54%,#ffffff 100%);
}

body[data-auth-page="admin"] .auth-nav{
  height:68px;
  border-bottom:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.84);
  box-shadow:0 12px 36px rgba(37,99,235,.055);
}

body[data-auth-page="admin"] .auth-brand img{
  width:42px;
  height:42px;
}

body[data-auth-page="admin"] .auth-brand strong{
  font-size:16px;
  font-weight:900;
}

body[data-auth-page="admin"] .auth-link{
  border-radius:14px;
  font-weight:820;
}

body[data-auth-page="admin"] .auth-link.primary{
  min-width:92px;
  background:linear-gradient(135deg,#4f46e5 0%,#2563eb 100%);
  box-shadow:0 14px 28px rgba(37,99,235,.20);
}

body[data-auth-page="admin"] .auth-main{
  width:min(520px,calc(100vw - 36px));
  grid-template-columns:minmax(0,1fr);
  justify-content:center;
  gap:0;
  align-items:center;
  padding:70px 0 76px;
}

body[data-auth-page="admin"] .admin-login-card{
  position:relative;
  overflow:hidden;
  padding:32px;
  border-radius:28px;
  border:1px solid rgba(226,232,240,.94);
  background:rgba(255,255,255,.94);
  box-shadow:0 24px 70px rgba(37,99,235,.10);
}

body[data-auth-page="admin"] .admin-login-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:4px;
  background:linear-gradient(90deg,#2563eb,#4f46e5,#7c3aed);
}

body[data-auth-page="admin"] .auth-kicker{
  min-height:28px;
  padding:0 11px;
  border-color:#bfdbfe;
  background:linear-gradient(135deg,#eff6ff,#f5f3ff);
  color:#4f46e5;
  font-size:12px;
  font-weight:900;
}

body[data-auth-page="admin"] .auth-title{
  margin-top:18px;
  font-size:30px;
  line-height:1.18;
  font-weight:920;
  color:#0f172a;
}

body[data-auth-page="admin"] .auth-sub{
  max-width:340px;
  margin-bottom:24px;
  color:#64748b;
  font-size:14px;
  line-height:1.7;
}

body[data-auth-page="admin"] .field label{
  color:#334155;
  font-size:12.5px;
  font-weight:850;
}

body[data-auth-page="admin"] .input-wrap{
  height:48px;
  border-radius:16px;
  border:1px solid rgba(203,213,225,.96);
  background:#fff;
  box-shadow:0 8px 18px rgba(15,23,42,.035);
}

body[data-auth-page="admin"] .input-wrap:focus-within{
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(37,99,235,.10),0 12px 24px rgba(37,99,235,.08);
}

body[data-auth-page="admin"] .check-line{
  margin-top:2px;
  color:#64748b;
  font-size:12.5px;
}

body[data-auth-page="admin"] .submit-btn{
  height:48px;
  margin-top:2px;
  border-radius:16px;
  background:linear-gradient(135deg,#2563eb 0%,#4f46e5 52%,#7c3aed 100%);
  box-shadow:0 18px 38px rgba(79,70,229,.24),0 4px 10px rgba(15,23,42,.08);
  font-size:15px;
  font-weight:900;
}

body[data-auth-page="admin"] .submit-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 24px 48px rgba(79,70,229,.30),0 8px 16px rgba(15,23,42,.10);
}

body[data-auth-page="admin"] .auth-foot{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(226,232,240,.86);
  color:#64748b;
  font-size:12.5px;
}

body[data-auth-page="admin"] .admin-access-panel{
  padding:30px;
  border-radius:28px;
  border:1px solid rgba(226,232,240,.94);
  background:
    radial-gradient(circle at 20% 0%,rgba(219,234,254,.72),rgba(219,234,254,0) 34%),
    radial-gradient(circle at 92% 10%,rgba(237,233,254,.58),rgba(237,233,254,0) 32%),
    linear-gradient(135deg,rgba(255,255,255,.96),rgba(248,251,255,.92));
  box-shadow:0 24px 70px rgba(37,99,235,.09);
  overflow:hidden;
}

.admin-access-head{
  display:flex;
  gap:16px;
  align-items:flex-start;
  padding-bottom:22px;
  border-bottom:1px solid rgba(226,232,240,.88);
}

.admin-access-icon{
  width:50px;
  height:50px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  border-radius:18px;
  color:#4f46e5;
  background:linear-gradient(135deg,#eff6ff,#f5f3ff);
  border:1px solid rgba(191,219,254,.9);
  box-shadow:0 14px 30px rgba(79,70,229,.12);
}

.admin-access-icon iconify-icon{
  font-size:25px;
}

.admin-access-head span:not(.admin-access-icon){
  display:inline-flex;
  min-height:26px;
  align-items:center;
  padding:0 10px;
  border-radius:999px;
  color:#4f46e5;
  background:#eef2ff;
  border:1px solid #c7d2fe;
  font-size:12px;
  font-weight:900;
}

.admin-access-head h2{
  margin:10px 0 8px;
  color:#0f172a;
  font-size:24px;
  line-height:1.28;
  font-weight:920;
}

.admin-access-head p{
  max-width:500px;
  margin:0;
  color:#64748b;
  font-size:14px;
  line-height:1.75;
}

.admin-access-list{
  display:grid;
  gap:12px;
  margin-top:22px;
}

.admin-access-item{
  display:flex;
  align-items:flex-start;
  gap:13px;
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.88);
  box-shadow:0 12px 28px rgba(15,23,42,.045);
}

.admin-access-item iconify-icon{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  border-radius:13px;
  color:#2563eb;
  background:#eff6ff;
  font-size:20px;
}

.admin-access-item strong{
  display:block;
  color:#0f172a;
  font-size:14px;
  line-height:1.35;
  font-weight:900;
}

.admin-access-item span{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-size:12.5px;
  line-height:1.6;
}

.admin-access-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}

.admin-access-summary div{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(226,232,240,.9);
  background:rgba(255,255,255,.72);
}

.admin-access-summary strong{
  display:block;
  color:#4f46e5;
  font-size:18px;
  line-height:1;
  font-weight:950;
}

.admin-access-summary span{
  display:block;
  margin-top:7px;
  color:#64748b;
  font-size:12px;
  font-weight:760;
}

@media(max-width:920px){
  body[data-auth-page="admin"] .auth-main{
    grid-template-columns:1fr;
    padding:28px 0 40px;
  }
  body[data-auth-page="admin"] .auth-side{
    order:0;
  }
}

@media(max-width:560px){
  body[data-auth-page="admin"] .auth-nav{
    padding:0 12px;
  }
  body[data-auth-page="admin"] .auth-nav-links{
    gap:4px;
  }
  body[data-auth-page="admin"] .auth-link.primary{
    min-width:auto;
  }
  body[data-auth-page="admin"] .admin-login-card,
  body[data-auth-page="admin"] .admin-access-panel{
    padding:22px;
    border-radius:24px;
  }
  body[data-auth-page="admin"] .auth-title{
    font-size:25px;
  }
  .admin-access-head{
    flex-direction:column;
  }
  .admin-access-head h2{
    font-size:21px;
  }
  .admin-access-summary{
    grid-template-columns:1fr;
  }
}
