html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    min-height: 100%;
    background: #030712;
}

html {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="light"],
html[data-theme="light"] body {
    background: #eef4ff !important;
    color: #14233b !important;
}

* {
    box-sizing: border-box;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44Nzcg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zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.account-recovery-page {
    --blue: #2389ff;
    --violet: #6e48ff;
    --text: #f6f8ff;
    --muted: #b8c1d5;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: clamp(24px, 4.2vw, 72px) clamp(28px, 5.5vw, 116px);
    color: var(--text);
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.14) 44%, rgba(0, 0, 0, 0.52) 100%),
        url("/images/brand/fond-login.png") center / cover no-repeat,
        #02050c;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    isolation: isolate;
}

.account-recovery-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 72% 50%, rgba(30, 123, 255, 0.16), transparent 28rem);
}

.account-recovery-card {
    width: min(100%, 640px);
    position: relative;
    z-index: 1;
    padding: clamp(30px, 3vw, 58px);
    border: 1px solid rgba(113, 144, 255, 0.72);
    border-radius: 18px;
    background:
        radial-gradient(circle at 18% 12%, rgba(53, 114, 186, 0.18), transparent 18rem),
        linear-gradient(145deg, rgba(8, 15, 28, 0.84), rgba(2, 6, 15, 0.72));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 44px 110px rgba(0, 0, 0, 0.46),
        0 0 60px rgba(35, 137, 255, 0.08);
    backdrop-filter: blur(18px);
}

.account-recovery-brand {
    display: grid;
    justify-items: center;
    width: max-content;
    color: inherit;
    text-decoration: none;
    margin: 0 auto 26px;
}

.account-recovery-brand img {
    width: 180px;
    height: auto;
    display: block;
    border-radius: 14px;
    filter: drop-shadow(0 0 26px rgba(35, 137, 255, 0.5));
}

.account-recovery-heading {
    text-align: center;
    margin-bottom: 30px;
}

.account-recovery-heading h1 {
    margin: 0;
    color: transparent;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 46%, #237fff 47%, #7561ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: clamp(1.72rem, 2.2vw, 2.15rem);
    font-weight: 850;
}

.account-recovery-heading p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.65;
}

.account-recovery-form {
    display: grid;
    gap: 16px;
}

.account-field {
    display: grid;
    gap: 9px;
}

.account-field label {
    font-weight: 720;
    color: #ffffff;
}

.account-input {
    min-height: 58px;
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid rgba(123, 151, 202, 0.36);
    border-radius: 11px;
    background: rgba(3, 8, 19, 0.48);
    box-shadow: inset 0 0 28px rgba(33, 93, 180, 0.06);
}

.account-input:focus-within {
    border-color: rgba(70, 139, 255, 0.88);
    box-shadow: 0 0 0 4px rgba(35, 137, 255, 0.12);
}

.account-input input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #f8fbff;
    background: transparent !important;
    font-size: 1rem;
    box-shadow: none;
    appearance: none;
    -webkit-text-fill-color: #f8fbff;
    caret-color: #f8fbff;
}

.account-input input::placeholder {
    color: rgba(204, 213, 234, 0.7);
}

.account-input input:-webkit-autofill,
.account-input input:-webkit-autofill:hover,
.account-input input:-webkit-autofill:focus {
    border: 0;
    -webkit-text-fill-color: #f8fbff;
    caret-color: #f8fbff;
    box-shadow: 0 0 0 1000px rgba(3, 8, 19, 0.92) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.account-icon {
    width: 26px;
    height: 26px;
    position: relative;
    display: block;
    color: #9aa9ca;
}

.account-icon.email::before {
    content: "";
    position: absolute;
    inset: 4px 2px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.account-icon.email::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 8px;
    height: 12px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.account-icon.lock::before {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    bottom: 3px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.account-icon.lock::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 2px;
    width: 10px;
    height: 12px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
}

.account-primary-button,
.account-secondary-link {
    min-height: 58px;
    display: grid;
    align-items: center;
    border-radius: 13px;
    font-weight: 820;
    text-decoration: none;
}

.account-primary-button {
    grid-template-columns: 1fr auto;
    margin-top: 8px;
    padding: 0 28px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #2494ff, #6041ff);
    box-shadow: 0 18px 50px rgba(40, 112, 255, 0.35);
    font-size: 1.08rem;
}

.account-secondary-link {
    justify-content: center;
    color: rgba(235, 241, 255, 0.82);
    border: 1px solid rgba(123, 151, 202, 0.34);
    background: rgba(3, 8, 19, 0.42);
}

.account-secondary-link:hover {
    color: #ffffff;
    border-color: rgba(75, 142, 255, 0.64);
}

.account-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(235, 241, 255, 0.78);
    font-size: 0.95rem;
    cursor: pointer;
    user-select: none;
}

.account-check input,
.account-check ::deep input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2389ff;
}

.account-validation,
.account-field .validation-message {
    color: #ff9da6;
}

.account-validation ul {
    margin-bottom: 0;
}

.account-status {
    margin: 0 0 18px;
}

.account-message {
    display: grid;
    gap: 16px;
    text-align: center;
    color: rgba(218, 226, 244, 0.82);
    line-height: 1.7;
}

.account-message p {
    margin: 0;
}

.error-card {
    max-width: 680px;
}

.error-diagnostic {
    display: grid;
    gap: 8px;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid rgba(123, 151, 202, 0.28);
    border-radius: 12px;
    background: rgba(3, 8, 19, 0.46);
    color: rgba(226, 235, 255, 0.82);
    text-align: center;
}

.error-diagnostic span {
    color: rgba(184, 193, 213, 0.76);
    font-size: 0.78rem;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.error-diagnostic code,
.error-diagnostic strong {
    overflow-wrap: anywhere;
    color: #ffffff;
    font-size: 0.94rem;
}

@media (max-width: 980px) {
    .account-recovery-page {
        justify-content: center;
        padding: 36px 24px 64px;
        overflow: auto;
    }
}

@media (max-width: 760px) {
    .account-recovery-page {
        padding: 22px 16px 44px;
    }

    .account-recovery-card {
        padding: 28px 20px;
    }

    .account-recovery-brand img {
        width: 150px;
    }
}

/* Light theme ------------------------------------------------------------- */
html[data-theme="light"] .home-page,
html[data-theme="light"] .login-page,
html[data-theme="light"] .external-login-page,
html[data-theme="light"] .manage-shell,
html[data-theme="light"] .account-recovery-page {
    color: #14233b !important;
    background:
        radial-gradient(circle at 78% 18%, rgba(55, 126, 255, 0.18), transparent 30rem),
        radial-gradient(circle at 12% 78%, rgba(111, 79, 255, 0.12), transparent 24rem),
        linear-gradient(135deg, #f8fbff 0%, #eef5ff 50%, #e7effc 100%) !important;
}

html[data-theme="light"] .login-page,
html[data-theme="light"] .external-login-page,
html[data-theme="light"] .account-recovery-page {
    background:
        linear-gradient(90deg, rgba(246, 250, 255, 0.18) 0%, rgba(246, 250, 255, 0.46) 44%, rgba(246, 250, 255, 0.88) 100%),
        url("/images/brand/fond-login.png") center / cover no-repeat,
        #edf4ff !important;
}

html[data-theme="light"] .home-page::before,
html[data-theme="light"] .manage-shell::before {
    opacity: 0.55 !important;
    background-image:
        linear-gradient(rgba(15, 43, 88, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 43, 88, 0.055) 1px, transparent 1px) !important;
}

html[data-theme="light"] .topbar,
html[data-theme="light"] .member-topbar,
html[data-theme="light"] .manage-topbar,
html[data-theme="light"] .login-card,
html[data-theme="light"] .external-login-card,
html[data-theme="light"] .account-recovery-card,
html[data-theme="light"] .manage-sidebar,
html[data-theme="light"] .manage-content,
html[data-theme="light"] .profile-hero,
html[data-theme="light"] .profile-form-panel,
html[data-theme="light"] .profile-status-panel,
html[data-theme="light"] .email-hero,
html[data-theme="light"] .email-card,
html[data-theme="light"] .password-hero,
html[data-theme="light"] .password-card,
html[data-theme="light"] .social-hero,
html[data-theme="light"] .provider-card,
html[data-theme="light"] .social-note,
html[data-theme="light"] .twofactor-hero,
html[data-theme="light"] .status-card,
html[data-theme="light"] .security-panel,
html[data-theme="light"] .security-alert,
html[data-theme="light"] .authenticator-hero,
html[data-theme="light"] .setup-card,
html[data-theme="light"] .qr-panel,
html[data-theme="light"] .verify-card,
html[data-theme="light"] .confirm-card,
html[data-theme="light"] .recovery-card,
html[data-theme="light"] .recovery-codes-hero,
html[data-theme="light"] .passkeys-hero,
html[data-theme="light"] .passkey-summary article,
html[data-theme="light"] .passkey-actions-panel,
html[data-theme="light"] .passkey-list,
html[data-theme="light"] .passkey-card,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .rename-card,
html[data-theme="light"] .data-hero,
html[data-theme="light"] .data-card,
html[data-theme="light"] .data-note,
html[data-theme="light"] .delete-card,
html[data-theme="light"] .hero-card,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .module-card,
html[data-theme="light"] .status-panel {
    border-color: rgba(38, 95, 173, 0.18) !important;
    background:
        radial-gradient(circle at 12% 8%, rgba(35, 137, 255, 0.1), transparent 18rem),
        rgba(255, 255, 255, 0.78) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 24px 70px rgba(35, 75, 135, 0.12) !important;
}

html[data-theme="light"] .login-card,
html[data-theme="light"] .external-login-card,
html[data-theme="light"] .account-recovery-card {
    background:
        radial-gradient(circle at 18% 12%, rgba(53, 114, 186, 0.12), transparent 18rem),
        rgba(255, 255, 255, 0.86) !important;
    backdrop-filter: blur(18px);
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] strong,
html[data-theme="light"] label,
html[data-theme="light"] .manage-title h1,
html[data-theme="light"] .profile-identity h2,
html[data-theme="light"] .form-heading h2,
html[data-theme="light"] .account-recovery-heading h1 {
    color: #10213a !important;
}

html[data-theme="light"] p,
html[data-theme="light"] li,
html[data-theme="light"] .manage-user,
html[data-theme="light"] .manage-return,
html[data-theme="light"] .account-message,
html[data-theme="light"] .login-options,
html[data-theme="light"] .register-link,
html[data-theme="light"] .form-heading p,
html[data-theme="light"] .profile-hero p,
html[data-theme="light"] .profile-status-card p,
html[data-theme="light"] .provider-main p,
html[data-theme="light"] .security-panel p,
html[data-theme="light"] .data-card p,
html[data-theme="light"] .passkey-card p {
    color: rgba(30, 48, 79, 0.76) !important;
}

html[data-theme="light"] a {
    color: #176dce;
}

html[data-theme="light"] .manage-nav-link,
html[data-theme="light"] .nav-link,
html[data-theme="light"] .social-button,
html[data-theme="light"] .passkey-button,
html[data-theme="light"] .account-secondary-link,
html[data-theme="light"] .secondary-action,
html[data-theme="light"] .card-action,
html[data-theme="light"] .qaya-action.secondary {
    color: #1a3152 !important;
    border-color: rgba(38, 95, 173, 0.2) !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

html[data-theme="light"] .manage-nav-link.active {
    color: #0d2442 !important;
    border-color: rgba(35, 137, 255, 0.32) !important;
    background: linear-gradient(135deg, rgba(35, 137, 255, 0.18), rgba(96, 65, 255, 0.12)) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select,
html[data-theme="light"] .input-shell,
html[data-theme="light"] .account-input,
html[data-theme="light"] .field-shell,
html[data-theme="light"] .qaya-field input,
html[data-theme="light"] .form-control,
html[data-theme="light"] kbd,
html[data-theme="light"] code {
    color: #12243d !important;
    -webkit-text-fill-color: #12243d;
    border-color: rgba(38, 95, 173, 0.24) !important;
    background: rgba(255, 255, 255, 0.72) !important;
    box-shadow: inset 0 0 24px rgba(35, 94, 170, 0.04) !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: rgba(58, 78, 112, 0.62) !important;
}

html[data-theme="light"] input:-webkit-autofill,
html[data-theme="light"] input:-webkit-autofill:hover,
html[data-theme="light"] input:-webkit-autofill:focus {
    -webkit-text-fill-color: #12243d;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.94) inset !important;
}

html[data-theme="light"] .divider span,
html[data-theme="light"] .decor-line,
html[data-theme="light"] hr {
    background: rgba(38, 95, 173, 0.16) !important;
    border-color: rgba(38, 95, 173, 0.16) !important;
}

html[data-theme="light"] .qaya-status,
html[data-theme="light"] .alert,
html[data-theme="light"] .security-alert,
html[data-theme="light"] .delete-warning,
html[data-theme="light"] .recovery-warning,
html[data-theme="light"] .provider-lock,
html[data-theme="light"] .limit-warning {
    color: #172d4b !important;
    border-color: rgba(38, 95, 173, 0.2) !important;
    background: rgba(255, 255, 255, 0.68) !important;
}

html[data-theme="light"] .danger-action,
html[data-theme="light"] .card-action.danger,
html[data-theme="light"] .qaya-action.danger {
    color: #9d1b3c !important;
    border-color: rgba(205, 52, 92, 0.28) !important;
    background: rgba(255, 244, 247, 0.86) !important;
}

html[data-theme="light"] .login-logo,
html[data-theme="light"] .manage-brand img,
html[data-theme="light"] .account-recovery-brand img {
    filter: drop-shadow(0 0 18px rgba(35, 137, 255, 0.28)) !important;
}

html[data-theme="light"] .orb-sphere,
html[data-theme="light"] .planet-sphere {
    background:
        radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.95), transparent 22%),
        radial-gradient(circle at 50% 48%, #d7e7ff, #7bb8ff 45%, #4c6fff 100%) !important;
}

html[data-theme="light"] .text-danger,
html[data-theme="light"] .validation-message,
html[data-theme="light"] .field-error {
    color: #c42552 !important;
}

html[data-theme="light"] .qr-code-frame {
    background: #ffffff !important;
}

html[data-theme="light"] .theme-toggle {
    color: #14233b !important;
    border-color: rgba(38, 95, 173, 0.22) !important;
    background: rgba(255, 255, 255, 0.86) !important;
    box-shadow: 0 18px 50px rgba(33, 74, 135, 0.18) !important;
}
