/* ============================================================
 * 极点云 · 统一登录页自定义主题（Authelia 4.39）
 * 由 nginx sub_filter 注入，不改 Authelia 本体
 * 位置：/srv/authelia/theme/theme.css
 * ============================================================ */

:root,
html[data-theme='dark'],
html.dark {
    --background: #0a0f1e;
    --foreground: #e9edff;
    --card: rgba(255, 255, 255, 0.045);
    --card-foreground: #e9edff;
    --border: rgba(255, 255, 255, 0.10);
    --input: rgba(255, 255, 255, 0.14);
    --primary: #6366f1;
    --primary-foreground: #ffffff;
    --secondary: rgba(255, 255, 255, 0.07);
    --muted: rgba(255, 255, 255, 0.05);
    --muted-foreground: #98a2c8;
    --accent: rgba(99, 102, 241, 0.16);
    --accent-foreground: #e9edff;
    --ring: #6366f1;
    --destructive: #f43f5e;
    --radius: 0.9rem;
    --custom-icon: #c7d2fe;
    --custom-loading-bar: #6366f1;
}

/* ---------- 背景：深空渐变 + 两团光晕 ---------- */
html,
body {
    min-height: 100%;
    background-color: #0a0f1e !important;
    background-image:
        radial-gradient(1100px 620px at 15% -10%, rgba(99, 102, 241, 0.30), transparent 62%),
        radial-gradient(900px 520px at 88% 8%, rgba(168, 85, 247, 0.22), transparent 58%),
        radial-gradient(760px 460px at 50% 112%, rgba(56, 189, 248, 0.14), transparent 62%) !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: #e9edff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
        'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}

/* ---------- 登录卡片：玻璃拟态 ---------- */
#first-factor-stage > div > div {
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 22px !important;
    padding: 2.2rem 2.1rem 1.9rem !important;
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    box-shadow:
        0 40px 90px -30px rgba(0, 0, 0, 0.85),
        0 2px 0 0 rgba(255, 255, 255, 0.04) inset;
}

/* ---------- 头像图标 ---------- */
#first-factor-stage svg#UserSvg {
    filter: drop-shadow(0 10px 28px rgba(99, 102, 241, 0.55));
    opacity: 0.95;
}

/* ---------- 标题 ---------- */
#first-factor-stage h5 {
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    color: #f2f5ff;
}

/* ---------- 输入框 ---------- */
#first-factor-stage input[data-slot='floating-input'] {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 12px !important;
    height: 3.6rem !important;
    color: #eef1ff !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
#first-factor-stage input[data-slot='floating-input']:hover {
    border-color: rgba(255, 255, 255, 0.22) !important;
}
#first-factor-stage input[data-slot='floating-input']:focus {
    background: rgba(255, 255, 255, 0.075) !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.22) !important;
    outline: none !important;
}
#first-factor-stage label[for='username-textfield'],
#first-factor-stage label[for='password-textfield'] {
    color: #98a2c8 !important;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

/* ---------- 主按钮 ---------- */
#sign-in-button {
    background-image: linear-gradient(135deg, #6366f1 0%, #a855f7 100%) !important;
    background-color: #6366f1 !important;
    border: 0 !important;
    border-radius: 12px !important;
    height: 3.1rem;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    color: #fff !important;
    box-shadow: 0 14px 34px -12px rgba(124, 58, 237, 0.85) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
#sign-in-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 18px 40px -12px rgba(124, 58, 237, 0.95) !important;
}
#sign-in-button:active {
    transform: translateY(0);
}

/* ---------- 记住我 / 复选框 ---------- */
#remember-checkbox[data-state='checked'] {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
}

/* ---------- 次要链接 ---------- */
#reset-password-button {
    color: #a5b4fc !important;
    text-decoration: none !important;
}
#reset-password-button:hover {
    color: #c7d2fe !important;
    text-decoration: underline !important;
}

/* ---------- 顶部语言按钮 ---------- */
#language-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #cfd6f5;
}
#language-button:hover {
    background: rgba(255, 255, 255, 0.10);
}

/* ---------- 页脚 Powered by Authelia ---------- */
#root > div:last-child,
#root p {
    color: rgba(233, 237, 255, 0.35) !important;
    font-size: 0.78rem;
}
