/* =========================================================
   ATO V3 · 用户登录系统（auth.css）
   账号区 / 全屏登录注册页 / 登录注册弹窗 / 待开通白色遮罩锁屏 / 我的作品面板
   配色沿用 tokens.css 的少女可爱风（粉 + 薰衣草紫）
   ========================================================= */

/* ==================== 全屏登录/注册页（加载前置） ==================== */
.ato-auth-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a0b2e 0%, #2d1b4e 40%, #4a1942 100%);
  color: #fff;
}
.aap-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,111,163,.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(167,139,250,.12) 0%, transparent 55%);
}
.aap-grain {
  position: absolute; inset: 0;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.aap-card {
  position: relative;
  width: min(400px, 88vw);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 214, 236, .25);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 36px 28px 28px;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}
.aap-logo {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ff9ec2, #c77dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.aap-sub {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin-bottom: 24px;
}
.aap-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 18px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,214,236,.2);
}
.aap-tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  font-size: 14px;
  transition: all .25s ease;
}
.aap-tab.active {
  background: linear-gradient(135deg, #ff8fb6, #ff6fa3);
  color: #fff;
  font-weight: 600;
}
.aap-tab:hover:not(.active) { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }
.aap-err {
  color: #ff8a8a;
  font-size: 12px;
  min-height: 16px;
  margin: 0 0 14px;
  text-align: left;
}
.aap-body { text-align: left; }
.aap-field { margin-bottom: 14px; }

/* 验证码行：输入框+发送按钮同行 */
.aap-field:has(.aap-send-code) { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.aap-field:has(.aap-send-code) .aap-input { flex: 0 0 auto; max-width: 140px; }
.aap-send-code { flex: 1; height: 38px; font-size: 12px; padding: 0 14px; white-space: nowrap; }
.aap-field label {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.65);
  margin-bottom: 5px;
}
.aap-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid rgba(255,214,236,.25);
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255,255,255,.07);
  color: #fff;
  outline: none;
  transition: border-color .2s;
}
.aap-input:focus { border-color: #ff8fb6; }
.aap-input::placeholder { color: rgba(255,255,255,.35); }
.aap-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff8fb6, #ff6fa3);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
  margin-top: 6px;
}
.aap-btn:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.aap-btn:disabled { opacity: .5; cursor: not-allowed; }
.aap-foot {
  margin-top: 18px;
  font-size: 11px;
  color: rgba(255,255,255,.35);
}

/* 顶部 #tb-spacer 内的账号区 */
.ato-acct {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}
.ato-acct-name {
  font-size: 13px;
  color: var(--text-2, #6b6479);
}
.ato-acct-exp {
  font-size: 11px;
  color: var(--accent, #c8a96a);
  background: rgba(200,169,106,0.12);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  margin-left: 4px;
  vertical-align: middle;
}
.ato-acct-btn { /* 复用 tb-btn 外观，仅作强调入口 */ }
.ato-link {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--accent, #ff8fb6) !important;
}
.ato-link:hover { background: var(--bg-hover, #ffe3f1) !important; }

/* 通用弹窗遮罩 */
.ato-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(40, 20, 45, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: ato-fade .2s ease;
}
@keyframes ato-fade { from { opacity: 0; } to { opacity: 1; } }
.ato-modal {
  width: min(420px, 92vw);
  max-height: 86vh;
  overflow: auto;
  background: var(--bg-2, #fff);
  border: 1px solid var(--border, #ffd6ec);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(255, 111, 163, .25);
  padding: 20px 22px;
}
.ato-modal h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--text-1, #3a3340);
}
.ato-modal .ato-sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-3, #9a93a6);
}
.ato-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.ato-tabs button {
  flex: 1;
  padding: 8px 0;
  border: 1px solid var(--border, #ffd6ec);
  background: var(--bg-1, #fff5fb);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2, #6b6479);
}
.ato-tabs button.active {
  background: linear-gradient(135deg, var(--accent, #ff8fb6), var(--accent-strong, #ff6fa3));
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}
.ato-field { margin-bottom: 12px; }
.ato-field label {
  display: block;
  font-size: 12px;
  color: var(--text-2, #6b6479);
  margin-bottom: 4px;
}
.ato-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border, #ffd6ec);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg-1, #fff5fb);
  color: var(--text-1, #3a3340);
  outline: none;
}
.ato-input:focus { border-color: var(--accent, #ff8fb6); }
.ato-err {
  color: var(--danger, #ff7a92);
  font-size: 12px;
  min-height: 16px;
  margin: 2px 0 8px;
}
.ato-btn-row { display: flex; gap: 8px; margin-top: 4px; }
.ato-btn-row .tb-btn { flex: 1; justify-content: center; }

/* 我的作品面板 */
.ato-works-section { margin-bottom: 18px; }
.ato-works-section .sec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1, #3a3340);
  margin-bottom: 8px;
}
.ato-works-list { display: flex; flex-direction: column; gap: 8px; }
.ato-work-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border, #ffd6ec);
  border-radius: 12px;
  background: var(--bg-1, #fff5fb);
}
.ato-work-row .w-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-1, #3a3340);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ato-work-row .w-time { font-size: 11px; color: var(--text-3, #9a93a6); white-space: nowrap; }
.ato-work-row .w-act { display: flex; gap: 6px; }
.ato-work-row .mini {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid var(--border, #ffd6ec);
  background: #fff;
  cursor: pointer;
  color: var(--text-2, #6b6479);
}
.ato-work-row .mini.primary { background: var(--accent-soft, rgba(255,143,182,.2)); color: var(--accent-strong, #ff6fa3); }
.ato-work-row .mini.danger { color: var(--danger, #ff7a92); border-color: var(--danger, #ff7a92); }
.ato-empty { font-size: 12px; color: var(--text-3, #9a93a6); padding: 8px 0; }

/* pending/disabled 全屏白色遮罩（90% 不透明白 + 居中卡片） */
.ato-lock {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
}
.aol-card {
  width: min(420px, 88vw);
  background: #fff;
  border: 1px solid var(--border, #ffd6ec);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  padding: 30px 26px;
  text-align: center;
}
.aol-icon { font-size: 36px; margin-bottom: 10px; }
.aol-title { font-size: 20px; font-weight: 700; color: var(--text-1, #3a3340); margin-bottom: 8px; }
.aol-msg { font-size: 13px; line-height: 1.7; color: var(--text-2, #6b6479); margin-bottom: 20px; }
.aol-card .tb-btn { margin: 4px; }
.aol-refresh {
  background: transparent !important;
  border: none !important;
  color: var(--accent, #ff8fb6) !important;
  font-size: 13px;
  cursor: pointer;
  margin-top: 10px;
  padding: 6px 12px;
}
.aol-refresh:hover { background: var(--bg-hover, #ffe3f1) !important; border-radius: 8px; }

/* 轻提示 toast */
.ato-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: rgba(40, 20, 45, .92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 10001;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  animation: ato-toast-in .2s ease;
  max-width: 80vw;
}
@keyframes ato-toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
