/* ==========================================================================
   来智AI · 登录 / 注册页主题层
   仅在 html[data-auth] 生效（由 auth-theme.js 按路由挂载）
   不改动应用 DOM 与逻辑，只覆盖视觉
   ========================================================================== */

html[data-auth]{
  --auth-bg:#EEF2F9;
  --auth-card:#FFFFFF;
  --auth-border:#E3E8F3;
  --auth-text:#0B1222;
  --auth-muted:#5A6478;
  --auth-input:#FBFCFE;
}

/* ---------------- 背景 ---------------- */
/* 替换应用自带的浅色渐变层 */
html[data-auth] [class*="bg-gradient-to-br"][class*="from-gray-50"]{
  background:
    radial-gradient(920px 540px at 16% -12%, rgba(18,181,168,.20), transparent 62%),
    radial-gradient(780px 540px at 88% 4%,   rgba(139,92,246,.24), transparent 64%),
    radial-gradient(760px 620px at 50% 112%, rgba(79,107,255,.18), transparent 62%),
    var(--auth-bg) !important;
}
/* 网格纹理 */
html[data-auth] [class*="bg-gradient-to-br"][class*="from-gray-50"]::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:
    linear-gradient(rgba(16,24,40,.05) 1px,transparent 1px),
    linear-gradient(90deg,rgba(16,24,40,.05) 1px,transparent 1px);
  background-size:56px 56px;
  -webkit-mask-image:radial-gradient(ellipse 72% 62% at 50% 42%,#000 18%,transparent 74%);
  mask-image:radial-gradient(ellipse 72% 62% at 50% 42%,#000 18%,transparent 74%);
}
/* 去掉原有的青色模糊球，改由上面的渐变承担 */
html[data-auth] .pointer-events-none.absolute.inset-0.overflow-hidden{display:none !important}

/* ---------------- 品牌区 ---------------- */
html[data-auth] .mb-4.inline-flex{
  border-radius:18px !important;
  box-shadow:0 20px 44px -18px rgba(79,107,255,.60), 0 0 0 1px rgba(79,107,255,.10) !important;
}
html[data-auth] .text-gradient{
  background-image:linear-gradient(92deg,#12B5A8 0%,#4F6BFF 52%,#8B5CF6 100%) !important;
  -webkit-background-clip:text !important;background-clip:text !important;
  letter-spacing:-.01em;
}
html[data-auth] .mb-8.text-center > p{
  color:var(--auth-muted) !important;
  font-size:.9rem;
}

/* ---------------- 卡片 ---------------- */
html[data-auth] .card-glass{
  background:var(--auth-card) !important;
  border:1px solid var(--auth-border) !important;
  border-radius:22px !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  box-shadow:
    0 34px 80px -40px rgba(16,24,40,.45),
    0 2px 8px -2px rgba(16,24,40,.06) !important;
}
/* 卡片顶部一条品牌渐变细线 */
html[data-auth] .card-glass{position:relative;overflow:hidden}
html[data-auth] .card-glass::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(92deg,#12B5A8,#4F6BFF 48%,#8B5CF6);
  opacity:.95;
}

/* ---------------- 表单 ---------------- */
html[data-auth] .card-glass h2{color:var(--auth-text) !important;letter-spacing:-.015em}
html[data-auth] .card-glass h2 + p{color:var(--auth-muted) !important}
html[data-auth] .input-label{color:#3A4560 !important;font-weight:600 !important;font-size:.82rem !important}

html[data-auth] .input{
  background:var(--auth-input) !important;
  border-color:#DEE4F0 !important;
  border-radius:12px !important;
  color:var(--auth-text) !important;
  transition:border-color .18s, box-shadow .18s, background .18s;
}
html[data-auth] .input::placeholder{color:#9AA3B8 !important}
html[data-auth] .input:focus{
  background:#fff !important;
  border-color:#7C6BFF !important;
  box-shadow:0 0 0 4px rgba(124,107,255,.14) !important;
  outline:none !important;
}
html[data-auth] .input:disabled{opacity:.6}

/* 输入框内的图标 */
html[data-auth] .pointer-events-none.absolute.inset-y-0.left-0 svg{color:#98A0B8 !important}

/* ---------------- 按钮 ---------------- */
html[data-auth] .btn-primary{
  background-image:linear-gradient(135deg,#4F6BFF 0%,#7C6BFF 55%,#8B5CF6 100%) !important;
  border-radius:12px !important;
  box-shadow:0 12px 28px -12px rgba(79,107,255,.72) !important;
  transition:transform .18s, box-shadow .18s, filter .18s;
}
html[data-auth] .btn-primary:hover{
  filter:brightness(1.06);
  box-shadow:0 16px 34px -12px rgba(124,107,255,.80) !important;
  transform:translateY(-1px);
}
html[data-auth] .btn-primary:active{transform:translateY(0)}

html[data-auth] .btn-secondary{
  border:1px solid var(--auth-border) !important;
  border-radius:12px !important;
  box-shadow:0 1px 2px rgba(16,24,40,.05) !important;
}
html[data-auth] .btn-secondary:hover{background:#F4F6FC !important}

/* ---------------- 链接与强调色 ---------------- */
html[data-auth] .text-primary-600,
html[data-auth] .text-primary-500,
html[data-auth] .text-primary-700{color:#4F6BFF !important}
html[data-auth] .hover\:text-primary-700:hover{color:#3F55D6 !important}
html[data-auth] .hover\:text-primary-600:hover{color:#4F6BFF !important}
html[data-auth] a{transition:color .16s}

/* 复选框 */
html[data-auth] input[type="checkbox"]{accent-color:#5B6CFF !important}

/* 分隔线 */
html[data-auth] .card-glass hr,
html[data-auth] .card-glass [class*="border-t"]{border-color:var(--auth-border) !important}

/* ---------------- 深色模式 ---------------- */
html[data-auth].dark{
  --auth-bg:#0A0D16;
  --auth-card:#10141F;
  --auth-border:#1E2637;
  --auth-text:#EDEFF7;
  --auth-muted:#98A0B8;
  --auth-input:#0C1019;
}
html[data-auth].dark [class*="bg-gradient-to-br"][class*="from-gray-50"]{
  background:
    radial-gradient(920px 540px at 16% -12%, rgba(18,181,168,.18), transparent 62%),
    radial-gradient(780px 540px at 88% 4%,   rgba(139,92,246,.26), transparent 64%),
    radial-gradient(760px 620px at 50% 112%, rgba(79,107,255,.20), transparent 62%),
    var(--auth-bg) !important;
}
html[data-auth].dark [class*="bg-gradient-to-br"][class*="from-gray-50"]::before{
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);
}
html[data-auth].dark .input-label{color:#AEB8CC !important}
html[data-auth].dark .input{color:var(--auth-text) !important}
html[data-auth].dark .input:focus{background:#0E1420 !important}
html[data-auth].dark .btn-secondary:hover{background:#161C2B !important}
html[data-auth].dark .card-glass h2{color:#EDEFF7 !important}

/* ---------------- 小屏微调 ---------------- */
@media (max-width: 480px){
  html[data-auth] .card-glass{padding:1.5rem !important;border-radius:18px !important}
  html[data-auth] .mb-8.text-center > h1{font-size:1.7rem !important}
}

/* ==========================================================================
   大屏左右分栏：左侧品牌版 + 右侧表单
   ========================================================================== */
@media (min-width: 1024px){
  html[data-auth] .min-h-screen.items-center.justify-center{
    display:grid !important;
    grid-template-columns:1.02fr .98fr;
    place-items:center stretch;
    padding:0 !important;
  }

  /* 左侧品牌面板 */
  html[data-auth] .min-h-screen.items-center.justify-center::before{
    content:"";
    grid-column:1;grid-row:1;
    width:100%;height:100%;
    background:
      url("/brand/mark.svg") no-repeat 68px 84px / 52px 52px,
      radial-gradient(620px 420px at 18% 10%, rgba(18,181,168,.50), transparent 62%),
      radial-gradient(560px 460px at 88% 88%, rgba(139,92,246,.55), transparent 64%),
      linear-gradient(158deg,#0A0F1E 0%,#111827 52%,#1A1430 100%);
  }
  /* 品牌文案（装饰性，不参与交互） */
  html[data-auth] .min-h-screen.items-center.justify-center::after{
    content:"一个 API Key\A接通所有主流大模型\A\A OpenAI · Anthropic · Gemini\A全协议兼容 · 多线路自动调度";
    white-space:pre-line;
    position:absolute;left:0;top:50%;transform:translateY(-50%);
    width:51%;padding:0 68px;box-sizing:border-box;
    color:#F3F5FB;font-size:34px;line-height:1.46;font-weight:800;letter-spacing:-.018em;
    z-index:2;pointer-events:none;
    text-shadow:0 2px 24px rgba(0,0,0,.35);
  }

  /* 右侧表单列 */
  html[data-auth] .relative.z-10.w-full.max-w-md{
    grid-column:2;grid-row:1;
    max-width:25rem !important;
    margin:0 auto !important;
    align-self:center;
    padding:3rem 0;
  }
  /* 面板与表单之间的细分隔线 */
  html[data-auth] .min-h-screen.items-center.justify-center{
    position:relative;
  }
  html[data-auth] .min-h-screen.items-center.justify-center{
    background-image:linear-gradient(90deg,transparent 51%,rgba(16,24,40,.06) 51%,transparent 51.3%);
  }
  html[data-auth] .text-gradient{font-size:1.75rem !important}
  html[data-auth] .mb-8.text-center{margin-bottom:1.75rem !important}
}

/* 大屏下背景层只铺右半边 */
@media (min-width: 1024px){
  html[data-auth] [class*="bg-gradient-to-br"][class*="from-gray-50"]{
    clip-path:inset(0 0 0 51%);
  }
}
/* ---------------- 条款弹窗配色对齐 ---------------- */
html[data-auth] .bg-primary-600{background-color:#5B6CFF !important}
html[data-auth] .hover\:bg-primary-700:hover{background-color:#4A57E0 !important}
html[data-auth] .shadow-primary-600\/20{--tw-shadow-color:rgba(91,108,255,.28) !important}
html[data-auth] .border-primary-100{border-color:#E0E5FF !important}
html[data-auth] .bg-primary-50\/70{background-color:#F4F6FF !important}
html[data-auth] .text-primary-900{color:#2B3A80 !important}
html[data-auth] .bg-primary-50{background-color:#F2F4FF !important}
