/* Light New — V1-compatible color lock.
   Locks V1 blue accent tokens so the base `light` design system (identical to V1)
   renders with the correct palette. All component aesthetics come from system.css. */
body.theme-light-new {
    --new-bg: #eef1f6;
    --new-surface: #ffffff;
    --new-surface-muted: #f6f8fb;
    --new-ink: #0c1222;
    --new-muted: #7e8fa8;
    --new-line: #dce3ed;
    --new-accent: #2563eb;
    --new-accent-strong: #1d4ed8;
    --new-warm: #c64f2f;
    --track-cover-secondary: rgb(198 79 47 / 8%);
    --new-focus: #5b8af5;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    background: var(--new-bg) !important;
    color: var(--new-ink) !important;
    /* V1 font stack — system-ui first, no Inter */
    font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* Lock V1 color tokens so nothing downstream can shift them. */
body.theme-light-new[data-theme-area="frontend"] {
    --ink: #0c1222 !important;
    --ink-2: #1a2438 !important;
    --ink-3: #3d4f6a !important;
    --ink-muted: #7e8fa8 !important;
    /* `--muted` was declared in no theme file, so its sixty-odd callers were
       living on their own `#64748b` fallback. Declared here at that same
       value: light mode renders exactly as it did, and the token is real.
       It stays a fourth, darker muted step below `--ink-muted` on purpose —
       #7e8fa8 is 3.3:1 on white and does not clear AA for body text. */
    --muted: #64748b !important;
    --canvas: #eef1f6 !important;
    --surface: #ffffff !important;
    --surface-alt: #f6f8fb !important;
    --surface-sunken: #edf1f7 !important;
    --border: #dce3ed !important;
    --border-strong: #bfc9d9 !important;
    --accent: #2563eb !important;
    --accent-hover: #1d4ed8 !important;
    --accent-soft: rgba(37, 99, 235, 0.08) !important;
    --primary: #2563eb !important;
    --df-system-primary: #2563eb !important;
    --accent-2: #0891b2 !important;
    --accent-2-soft: rgba(8, 145, 178, 0.08) !important;
    --border-focus: #5b8af5 !important;
    --md-accent: #2563eb !important;
    --md-accent-2: #0891b2 !important;
    --df-md-accent: #2563eb !important;
    background: #eef1f6 !important;
    color: #0c1222 !important;
}

/* Hero accent colors (V1 blue) */
body.theme-light-new[data-theme-area="frontend"] .df26-hero-tag {
    border-color: rgb(37 99 235 / 24%) !important;
    background: rgb(37 99 235 / 8%) !important;
    color: var(--new-accent-strong) !important;
}

body.theme-light-new[data-theme-area="frontend"] .df26-metric strong {
    color: var(--new-accent-strong) !important;
}

body.theme-light-new[data-theme-area="frontend"] :is(.df26-search-shell .search-input-wrap, .df26-search-shell .search-target-wrap) {
    border-color: var(--new-line) !important;
}

/* Form control palette lock (V1 values, no green ink residue) */
body.theme-light-new[data-theme-area="frontend"] :is(.form-control, .form-select, .query-control, textarea.form-control) {
    border-color: #dce3ed !important;
    background: #ffffff !important;
    color: #0c1222 !important;
    box-shadow: inset 0 1px 1px rgb(12 18 34 / 3%) !important;
}

body.theme-light-new[data-theme-area="frontend"] :is(.form-control, .form-select, .query-control, textarea.form-control)::placeholder {
    color: #7e8fa8 !important;
}

/* Shell background */
.theme-light-new .dfb-shell,
.theme-light-new .dfb-page,
.theme-light-new .dfb-shell-bg {
    background: var(--new-bg) !important;
}

/* V1 background decorations are restored: grid / scanlines / noise / particles visible. */
.theme-light-new .dfb-grid-overlay,
.theme-light-new .df26-scanlines,
.theme-light-new .df26-noise,
.theme-light-new .dfb-particles {
    display: block !important;
}

/* Brand text color */
.theme-light-new .dfb-brand-text strong,
.theme-light-new h1,
.theme-light-new h2,
.theme-light-new h3 {
    color: var(--new-ink) !important;
}

.theme-light-new .dfb-brand-text span,
.theme-light-new .text-muted {
    color: var(--new-muted);
}

/* Button tactile feedback (V1 effects.css already has this, but ensure it) */
.theme-light-new :is(.btn, button, [role="button"]) {
    transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease !important;
}

.theme-light-new :is(.btn, button, [role="button"]):active {
    transform: scale(0.97);
}

/* Pagination active state (V1 blue, no green).
   This block was headed "Leaderboard / segmented active states" and carried
   three further rules for `.leaderboard-period-tabs`. Four classes are gone
   from it — `.leaderboard-period-tabs`, `.segmented-control`, `.community-tabs`
   and `.community-filter-chips` — because no view, script or command renders
   any of them. The leaderboard's period tabs became the text tab strip in
   competition-index.css, and the community's became `.community-period-tabs`.
   `.df-pagination` is the selector here that still matches something. */
body.theme-light-new.theme-light[data-theme-area="frontend"] .df-pagination .page-item.active .page-link {
    border-color: var(--new-accent) !important;
    background: var(--new-accent) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* Community page variables (V1 ink, no green residue) */
body.theme-light-new.theme-light[data-theme-area="frontend"] .community-page {
    --community-surface: #ffffff;
    --community-surface-alt: #f6f8fb;
    --community-border: rgb(12 18 34 / 14%);
    --community-ink: #0c1222;
    --community-muted: #7e8fa8;
}

/* Prose / markdown reading (V1 blue accent) */
body.theme-light-new.theme-light[data-theme-area="frontend"] :is(.prose, .prose-reading, .df-md-reading) {
    --md-accent: #2563eb !important;
    --md-accent-2: #c64f2f !important;
    --md-accent-cool: #1d4ed8 !important;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .df-md-reading blockquote {
    border-color: var(--new-line) !important;
    border-left-color: var(--new-accent) !important;
    background: rgb(37 99 235 / 5%) !important;
    color: var(--new-ink) !important;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .df-md-reading code:not(pre code) {
    border-color: rgb(37 99 235 / 18%) !important;
    background: rgb(37 99 235 / 8%) !important;
    color: var(--new-accent-strong) !important;
}

body.theme-light-new[data-theme-area="frontend"] .cropper-view-box {
    outline-color: var(--new-accent) !important;
}

/* Assist links */
body.theme-light-new[data-theme-area="frontend"] .df-assist-links a:hover {
    border-color: rgb(37 99 235 / 34%) !important;
    background: var(--accent-soft) !important;
    color: var(--new-accent-strong) !important;
}

body.theme-light-new[data-theme-area="frontend"] .df-assist-links a:focus-visible,
body.theme-light-new[data-theme-area="frontend"] .df-assist-links a.is-active {
    border-color: var(--new-accent) !important;
    background: var(--new-accent) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgb(37 99 235 / 28%) !important;
    outline: 2px solid transparent !important;
    outline-offset: 2px;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .dfb-nav-link.is-active {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

body.theme-light-new[data-theme-area="frontend"] :is(.btn-primary, .df-button-primary, .df26-search-button) {
    border-color: var(--new-accent) !important;
    background: var(--new-accent) !important;
    color: #ffffff !important;
}

/* Focus-visible accessibility */
.theme-light-new :is(a, button, input, select, textarea):focus-visible {
    outline: 2px solid var(--new-focus) !important;
    outline-offset: 2px !important;
}

/* Theme switcher (V1 blue active state, no green) */
.theme-light-new .dfb-theme-switcher-menu {
    transform-origin: top right;
    border: 1px solid var(--new-line) !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    box-shadow: 0 14px 34px rgb(12 18 34 / 14%) !important;
    transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out) !important;
}

.theme-light-new .dfb-theme-switcher-current-label,
.theme-light-new .dfb-theme-switcher-copy span,
.theme-light-new .dfb-theme-switcher-copy small {
    white-space: nowrap !important;
}

@media (min-width: 769px) and (max-width: 1120px) {
    body.theme-light-new[data-theme-area="frontend"] .dfb-theme-switcher-toggle {
        width: 38px !important;
        min-width: 38px !important;
        padding-inline: 0 !important;
    }

    body.theme-light-new[data-theme-area="frontend"] .dfb-theme-switcher-current-label,
    body.theme-light-new[data-theme-area="frontend"] .dfb-theme-switcher-caret {
        display: none !important;
    }
}

.theme-light-new .dfb-theme-switcher-item {
    border-radius: 5px !important;
}

.theme-light-new .dfb-theme-switcher-item.is-active {
    background: var(--accent-soft) !important;
    color: var(--new-accent-strong) !important;
}

/* Touch target sizing for accessibility */
body.theme-light-new[data-theme-area="frontend"] .dfb-footer-link-grid a,
body.theme-light-new[data-theme-area="frontend"] .dfb-footer-support-actions .btn,
body.theme-light-new[data-theme-area="frontend"] .dfb-header-actions .btn-sm,
body.theme-light-new[data-theme-area="frontend"] .search-term-row a.chip,
body.theme-light-new[data-theme-area="frontend"] main .alert a,
body.theme-light-new[data-theme-area="frontend"] .auth-secondary-link a {
    display: inline-flex;
    min-height: 36px !important;
    align-items: center;
}

@media (max-width: 640px) {
    body.theme-light-new[data-theme-area="frontend"] .dfb-footer-link-grid a,
    body.theme-light-new[data-theme-area="frontend"] .dfb-footer-support-actions .btn,
    body.theme-light-new[data-theme-area="frontend"] .dfb-header-actions .btn-sm,
    body.theme-light-new[data-theme-area="frontend"] .search-term-row a.chip,
    body.theme-light-new[data-theme-area="frontend"] main .alert a,
    body.theme-light-new[data-theme-area="frontend"] .auth-secondary-link a {
        min-height: 44px !important;
    }
}

/* Content must remain readable before JavaScript or viewport observers run. */
body.theme-light-new[data-theme-area="frontend"] :is(
    .dfb-page,
    .question-stage,
    .timeline-item,
    .catalog-line,
    .info-rail-section,
    .stat-card,
    .hero-entry,
    .df-entry,
    .package-line,
    .feature-band,
    .surface
) {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* /more is a compact page navigation, not a timeline or a second content card. */
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-layout {
    grid-template-columns: minmax(230px, 240px) minmax(0, 1fr) !important;
    align-items: start;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-rail {
    align-self: start;
    min-width: 0;
    padding: 16px 18px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--surface-alt) !important;
    box-shadow: none !important;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-rail h3 {
    position: relative;
    margin: 0 0 8px;
    padding-left: 10px;
    color: var(--ink);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-rail h3::before {
    content: "";
    position: absolute;
    inset: 2px auto 2px 0;
    width: 2px;
    background: var(--accent);
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-list::before,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link::before,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link::after {
    content: none;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link.catalog-line {
    display: block !important;
    height: auto !important;
    min-height: 56px !important;
    padding: 10px 12px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ink-2);
    text-decoration: none;
    overflow-wrap: anywhere;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link:hover {
    background: var(--surface) !important;
    color: var(--accent);
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link.is-active {
    background: var(--accent-soft) !important;
    color: var(--accent);
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link .catalog-title {
    margin: 0;
    color: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link .catalog-category {
    display: block;
    margin-top: 2px;
    color: var(--ink-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link .catalog-summary { display: none; }

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-content,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-content.html-page,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-layout.has-html-page .more-pages-content.html-page,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-content.modular-page,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-layout.has-modular-page .more-pages-content {
    padding: clamp(28px, 3.4vw, 44px) !important;
    border-radius: var(--radius-lg) !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-content.about-us-page,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-content.modular-page,
body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-content.html-page {
    width: min(100%, 1120px) !important;
}

@media (max-width: 991.98px) {
    body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-layout {
        grid-template-columns: 1fr !important;
    }

    body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-rail {
        position: static;
    }
}

@media (max-width: 575.98px) {
    body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-rail {
        padding: 14px 16px !important;
    }

    body.theme-light-new.theme-light[data-theme-area="frontend"] .more-pages-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 2px;
    }

    body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link,
    body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link.catalog-line {
        flex: 0 0 auto;
        padding: 8px 10px !important;
        white-space: nowrap;
    }

    body.theme-light-new.theme-light[data-theme-area="frontend"] .more-page-link .catalog-category { display: none; }
}

/* --- Light UI polish: empty-state tip cards ---------------------- */
body.theme-light-new.theme-light[data-theme-area="frontend"] .empty-state-suggestions,
body.theme-light-new.theme-light[data-theme-area="frontend"] .df-empty-state-suggestions {
    counter-reset: df-tip;
    gap: 10px !important;
    width: min(100%, 38rem) !important;
    margin-top: 6px !important;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .empty-state-suggestions li,
body.theme-light-new.theme-light[data-theme-area="frontend"] .df-empty-state-suggestions li {
    position: relative !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 13px 16px !important;
    border: 1px solid var(--new-line) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    color: var(--ink-3) !important;
    font-size: 0.9rem !important;
    line-height: 1.55 !important;
    text-align: left !important;
    box-shadow: 0 1px 2px rgba(12, 18, 34, 0.04) !important;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .empty-state-suggestions li::before,
body.theme-light-new.theme-light[data-theme-area="frontend"] .df-empty-state-suggestions li::before {
    counter-increment: df-tip;
    content: counter(df-tip);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--new-accent);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

/* --- Light UI polish: learning-track fallback cover -------------- */
body.theme-light-new.theme-light[data-theme-area="frontend"] .track-cover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-soft), rgba(37, 99, 235, 0.06));
    border: 1px solid color-mix(in srgb, var(--new-accent) 18%, var(--new-line));
    color: var(--new-accent);
    font-size: 2.1rem;
    font-weight: 700;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .track-cover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

body.theme-light-new.theme-light[data-theme-area="frontend"] .track-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
    .theme-light-new *,
    .theme-light-new *::before,
    .theme-light-new *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* === Uniformity pass: list rows → card language (align to .package-line) ===
   下载中心 / Wiki / 我的投稿 的 .catalog-line 在亮色下原为「半透蓝白底 + 仅下边框 +
   7px 圆角」的分隔条样式，与 challenges/contests 的 .package-line 卡片不一致。
   统一为：白卡表面 + 全 1px 边框 + 11px 圆角 + 16px 内边距。 */
body.theme-light-new.theme-light[data-theme-area="frontend"] .catalog {
    display: grid !important;
    gap: 12px !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .catalog-line {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 11px !important;
    padding: 16px !important;
}

/* 公告 .bulletin-item 原为透明底 + 下边框 + 0 圆角，统一为卡片语言。 */
body.theme-light-new.theme-light[data-theme-area="frontend"] .bulletin-item {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 11px !important;
    padding: 16px !important;
}

/* 复盘 .writeup-card 在亮色下原用略深的边框 (rgba(203,213,225,.55)) 与
   0.92 表面，与其余列表卡 (0.94 / 0.16) 不一致，统一为同一套卡片语言。 */
body.theme-light-new.theme-light[data-theme-area="frontend"] .writeup-card {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 11px !important;
}

/* === (已退役) Uniformity pass: 社区共建「最新动态 / 最近采纳」→ 卡片语言 ===
   这组规则原本把「仅下边框 + 无背景」的 .community-feed-item / .community-timeline article
   分隔条，统一为与全站 .package-line / .catalog-line 一致的白卡（全边框 + 圆角 + 内边距），
   而 .community-rank-row / .community-guide-list 保持分隔条。
   规则已删除：没有任何视图、脚本或命令渲染这些类——社区页现在是 community.css 的
   .community-overview-* 词汇，动态正文是 .community-feed-body。留下的只是设计意图。 */

/* --- Auth pages --------------------------------------------------- */
/* Fix left/right panel misalignment in the split layout:
   stretch both columns to an equal height so the dark aside box and the
   white panel box share the same top/bottom edges. */
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-layout {
    align-items: stretch !important;
}

/* Clean accent rule under the auth aside title (intentional, not decorative-AI) */
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-aside .page-title {
    position: relative !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-aside .page-title::after {
    content: "" !important;
    display: block !important;
    width: 40px !important;
    height: 3px !important;
    margin-top: .7rem !important;
    border-radius: 999px !important;
    background: var(--accent, #2563eb) !important;
}

/* Register form rhythm is now owned by .auth-form-grid in frontend-polish.css;
   the old --bs-gutter-y overrides for Bootstrap row are no longer needed. */

/* Registration access notice left accent bar (visual accent, kept). */
body.theme-light-new.theme-light[data-theme-area="frontend"].route-register .registration-access-notice {
    border-left: 3px solid rgba(37, 99, 235, 0.55) !important;
}

/* === Auth visual polish: restrained form surface and clear focus. ========= */

/* A form is a work surface, not a marketing card. */
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel {
    background: #ffffff !important;
    border: 1px solid #dbe3ee !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

/* Primary CTA: visible but calm; press feedback confirms the action. */
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .btn-primary {
    border-radius: 10px !important;
    font-weight: 600 !important;
    letter-spacing: .01em !important;
    border: 1px solid var(--new-accent) !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.16) !important;
    transition: transform .16s var(--ease-out), background-color .16s ease, border-color .16s ease !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .btn-primary:hover {
    background: var(--new-accent-strong) !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .btn-primary:active {
    transform: scale(0.98) !important;
}

/* Inputs: slightly stronger border + hover + blue focus ring */
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .form-control {
    border-color: #cdd6e4 !important;
    border-radius: 10px !important;
    transition: border-color .15s ease, box-shadow .15s ease !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .form-control:hover {
    border-color: #b3bfd2 !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .form-control:focus {
    border-color: var(--new-accent) !important;
    box-shadow: inset 0 1px 1px rgba(12, 18, 34, 0.03), 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
}

/* Notice: subtle left accent bar */
body.theme-light-new.theme-light[data-theme-area="frontend"] .registration-access-notice {
    border-left: 3px solid rgba(37, 99, 235, 0.55) !important;
}

/* Secondary links: muted, hover reveals accent */
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-secondary-link a {
    color: var(--new-muted) !important;
    text-decoration: none !important;
    transition: color .15s ease !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-secondary-link a:hover {
    color: var(--new-accent) !important;
    text-decoration: underline !important;
}

/* Outline secondary (e.g. 返回个人中心 on open-login) — match the
   primary CTA's radius/weight so the paired buttons feel consistent. */
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .btn-outline-secondary {
    border-radius: 10px !important;
    font-weight: 600 !important;
    border-color: #cdd6e4 !important;
    color: var(--new-muted) !important;
    transition: border-color .15s ease, color .15s ease, background .15s ease !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .btn-outline-secondary:hover {
    border-color: var(--new-accent) !important;
    color: var(--new-accent) !important;
    background: rgba(37, 99, 235, 0.06) !important;
}

/* Alerts inside auth cards: consistent radius + tidy padding, and
   theme-tinted info/danger so they read well in both themes. */
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .alert {
    border-radius: 10px !important;
    border-width: 1px !important;
    padding: .7rem .9rem !important;
    font-size: .9rem !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .alert-info {
    background: rgba(37, 99, 235, 0.07) !important;
    border-color: rgba(37, 99, 235, 0.28) !important;
    color: #1e3a8a !important;
}
body.theme-light-new.theme-light[data-theme-area="frontend"] .auth-panel .alert-danger {
    background: rgba(239, 68, 68, 0.07) !important;
    border-color: rgba(239, 68, 68, 0.30) !important;
    color: #b91c1c !important;
}
