/* =====================================================================
 * Aiterich UI Harmonization — T-P0-CONVERSION-ENTRY-UI-HARMONIZATION-PRODUCTION-RELEASE-V1
 * Date: 2026-05-18
 * Scope: /auth/ (7513), /reset-password/ (7528), /download/ (7522).
 * Pure additive override. 0 mutation to auth.css / download-center.css / theme.
 * Rollback = delete this file + sibling .php mu-plugin.
 * Provenance: staging-verified — STAGING-V1 (initial harmonization) + STAGING-POLISH-V1
 *             (reset-password card centering + /download/ adc-notice hide).
 * ===================================================================== */

:root {
	/* Tech-blue tokens — desaturated from #046bd2 / #3b82f6 to harmonize with site header/hero. */
	--aih-primary:           #2f6fcf;
	--aih-primary-hover:     #245faa;
	--aih-primary-soft-bg:   #eff5fc;
	--aih-primary-soft-bord: #c7dcf2;
	--aih-focus-ring:        0 0 0 3px rgba(47, 111, 207, 0.14);
	--aih-input-border:      #d6dbe1;
	--aih-input-border-fc:   #6ea6e6;
	--aih-text-strong:       #1e293b;
	--aih-text-soft:         #475569;
}

/* ---------------------------------------------------------------------
 * 1. Float-label fix — label must NOT sit on input border-top.
 *    Lift it ~8px above the border, widen background mask, lift z-index.
 * ------------------------------------------------------------------- */
.aiterich-float-field label {
	padding: 0 6px;
	font-weight: 500;
	z-index: 1;
}
.aiterich-float-field input:focus ~ label,
.aiterich-float-field input:not(:placeholder-shown) ~ label {
	top: -8px;
	font-size: 12px;
	color: var(--aih-text-strong);
	background: #fff;
}

/* ---------------------------------------------------------------------
 * 2. Input focus — softer border + light brand focus-ring.
 * ------------------------------------------------------------------- */
.aiterich-float-field input {
	border-color: var(--aih-input-border);
}
.aiterich-float-field input:focus {
	border-color: var(--aih-input-border-fc);
	box-shadow: var(--aih-focus-ring);
}

/* ---------------------------------------------------------------------
 * 3. Primary action button — desaturated brand blue.
 * ------------------------------------------------------------------- */
.aiterich-btn {
	background: var(--aih-primary);
}
.aiterich-btn:hover:not(:disabled) {
	background: var(--aih-primary-hover);
}
.aiterich-btn:disabled {
	background: var(--aih-primary-soft-bg);
	color: #a5b4cc;
}

/* ---------------------------------------------------------------------
 * 4. Outline / text variants — same tone family as primary.
 * ------------------------------------------------------------------- */
.aiterich-btn-outline {
	color: var(--aih-primary);
	border-color: var(--aih-primary);
}
.aiterich-btn-outline:hover {
	color: var(--aih-primary-hover);
	border-color: var(--aih-primary-hover);
	background: var(--aih-primary-soft-bg);
}
.aiterich-btn-text {
	color: var(--aih-primary);
}
.aiterich-btn-text:hover {
	color: var(--aih-primary-hover);
}

/* ---------------------------------------------------------------------
 * 5. Auth tabs active state — was pure #000 with #000 underline.
 *    Soften to slate-800 text + brand-tone underline to match site header.
 * ------------------------------------------------------------------- */
.aiterich-auth-tab.active {
	color: var(--aih-text-strong);
	border-bottom-color: var(--aih-primary);
}

/* ---------------------------------------------------------------------
 * 5b. Primary tab (登录 / 注册 pill) — was #0f5f9a deep blue with strong shadow.
 *     Tone down to brand-soft blue with subtle shadow.
 * ------------------------------------------------------------------- */
.aiterich-auth-primary-tabs {
	background: #f4f7fb;
	border-color: #e2e8f0;
}
.aiterich-auth-primary-tab {
	color: var(--aih-text-soft);
}
.aiterich-auth-primary-tab.active {
	background: var(--aih-primary);
	color: #fff;
	box-shadow: 0 4px 10px rgba(47, 111, 207, 0.16);
}
.aiterich-auth-primary-tab:not(.active):hover {
	background: rgba(47, 111, 207, 0.06);
	color: var(--aih-text-strong);
}

/* ---------------------------------------------------------------------
 * 5c. Unified shell buttons — match auth.css `.aiterich-auth-unified .aiterich-btn*`
 *     specificity to override #0f3a63 / #12497d / #0f5f9a.
 * ------------------------------------------------------------------- */
.aiterich-auth-unified .aiterich-btn {
	background: var(--aih-primary);
}
.aiterich-auth-unified .aiterich-btn:hover,
.aiterich-auth-unified .aiterich-btn:focus-visible {
	background: var(--aih-primary-hover);
}
.aiterich-auth-unified .aiterich-btn-outline {
	border-color: var(--aih-input-border);
	color: var(--aih-primary);
}
.aiterich-auth-unified .aiterich-btn-outline:hover,
.aiterich-auth-unified .aiterich-btn-outline:focus-visible {
	border-color: var(--aih-primary);
	color: var(--aih-primary-hover);
	background: var(--aih-primary-soft-bg);
}
.aiterich-auth-unified .aiterich-btn-text {
	color: var(--aih-primary);
}
.aiterich-auth-unified .aiterich-btn-text:hover,
.aiterich-auth-unified .aiterich-btn-text:focus-visible {
	color: var(--aih-primary-hover);
}

/* 5d. Shell card variant (used by some panels) */
.aiterich-auth-shell-card .aiterich-btn {
	background: var(--aih-primary);
}
.aiterich-auth-shell-card .aiterich-btn:hover,
.aiterich-auth-shell-card .aiterich-btn:focus-visible {
	background: var(--aih-primary-hover);
}

/* ---------------------------------------------------------------------
 * 6. Override existing #046bd2 / #045cb4 !important rules in auth.css
 *    (we must match !important specificity to win the cascade).
 * ------------------------------------------------------------------- */
.aiterich-auth-unified--download-gate .aiterich-auth-primary-tab.active,
.aiterich-auth-unified--download-gate .aiterich-auth-primary-tab.active:hover {
	background: var(--aih-primary) !important;
	background-color: var(--aih-primary) !important;
}
.aiterich-auth-unified--logged-out .aiterich-auth-shell-actions .aiterich-auth-pill:first-child {
	background: var(--aih-primary) !important;
	border-color: var(--aih-primary) !important;
}
.aiterich-auth-unified--logged-out .aiterich-auth-shell-actions .aiterich-auth-pill:first-child:hover {
	background: var(--aih-primary-hover) !important;
	border-color: var(--aih-primary-hover) !important;
}
.aiterich-auth-unified--logged-out .aiterich-auth-shell-actions .aiterich-auth-pill.aiterich-auth-pill--light,
.aiterich-auth-unified--logged-out .aiterich-auth-shell-actions .aiterich-auth-pill.aiterich-auth-pill--outline {
	color: var(--aih-primary) !important;
	background: var(--aih-primary-soft-bg) !important;
	border-color: var(--aih-primary-soft-bord) !important;
}
.aiterich-auth-unified--logged-out .aiterich-auth-shell-actions .aiterich-auth-pill.aiterich-auth-pill--light:hover,
.aiterich-auth-unified--logged-out .aiterich-auth-shell-actions .aiterich-auth-pill.aiterich-auth-pill--outline:hover {
	background: #e0eaf6 !important;
	border-color: #aac6e8 !important;
}

/* ---------------------------------------------------------------------
 * 7. Astra theme link color override — scoped to the 3 conversion pages only.
 *    Replaces global #046bd2 with desaturated brand tone WITHOUT touching theme files.
 * ------------------------------------------------------------------- */
body.page-id-7513 a,
body.page-id-7528 a,
body.page-id-7522 a {
	color: var(--aih-primary);
}
body.page-id-7513 a:hover,
body.page-id-7513 a:focus,
body.page-id-7528 a:hover,
body.page-id-7528 a:focus,
body.page-id-7522 a:hover,
body.page-id-7522 a:focus {
	color: var(--aih-primary-hover);
}

/* ---------------------------------------------------------------------
 * 8. /download/ page — harmonize download list hover with brand tone.
 *    (Existing inline aiterich-download-fix-css uses #f0f0f0 / #333 hover;
 *     we keep that as base but switch to brand accent on hover/active.)
 * ------------------------------------------------------------------- */
body.page-id-7522 .aiterich-download-item:hover {
	border-color: var(--aih-primary) !important;
}
body.page-id-7522 .aiterich-download-link:hover {
	color: var(--aih-primary) !important;
}

/* =====================================================================
 * POLISH V1 (T-P0-CONVERSION-ENTRY-UI-HARMONIZATION-STAGING-POLISH-V1, 2026-05-18)
 * Two targeted CSS additions, staging-only, no logic / template touch.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 11. /reset-password/ — shift card down toward viewport mid-area.
 *     Desktop: responsive clamp; capped at 180px so it never breaks on
 *              short windows. !important needed because auth.css line 1655
 *              + 1863 declare `margin: 0 auto !important` on the wrapper.
 *     Mobile : 0 extra offset — auth.css already gives the wrapper
 *              padding-top: 128px which is plenty for small screens.
 * ------------------------------------------------------------------- */
body.page-id-7528 .aiterich-auth-unified--reset {
	margin-top: clamp(40px, 14vh, 180px) !important;
}
@media (max-width: 760px) {
	body.page-id-7528 .aiterich-auth-unified--reset {
		margin-top: 0 !important;
	}
}

/* ---------------------------------------------------------------------
 * 12. /download/ — hide the legacy ADC product-notice banner.
 *     Selector targets the notice container only; search box / category
 *     tabs / download list are untouched.
 * ------------------------------------------------------------------- */
body.page-id-7522 .adc-notice {
	display: none !important;
}

/* ---------------------------------------------------------------------
 * 9. /reset-password/ — keep visual rhythm consistent with /auth/.
 *    The shell-actions pill row uses the same tokens as logged-out above.
 *    Inputs / float labels inherit rules 1-2.
 * ------------------------------------------------------------------- */
.aiterich-auth-unified--reset .aiterich-auth-pill {
	border-radius: 6px;
}

/* ---------------------------------------------------------------------
 * 10. Reduce link "blue overload" for inline text-links inside auth shell
 *     (e.g. "忘记密码？", switch to register link). Same tone, lower weight.
 * ------------------------------------------------------------------- */
.aiterich-auth-text-link,
.aiterich-auth-inline-row a {
	color: var(--aih-primary);
}
.aiterich-auth-text-link:hover,
.aiterich-auth-inline-row a:hover {
	color: var(--aih-primary-hover);
}
