.login-stage,
.activation-panel {
    transition: opacity .28s ease, transform .36s cubic-bezier(.16, 1, .3, 1), filter .28s ease;
}

.login-stage.is-leaving {
    opacity: 0;
    transform: translateX(-28px) scale(.96);
    filter: blur(2px);
    pointer-events: none;
}

.activation-panel {
    display: none;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateX(28px) scale(.96);
    filter: blur(2px);
}

.activation-panel.is-active {
    display: block;
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
}

.activation-panel.is-entering {
    animation: activationPanelIn .38s cubic-bezier(.16, 1, .3, 1) both;
}

.activation-panel.is-leaving {
    animation: activationPanelOut .3s ease both;
}

@keyframes activationPanelIn {
    from { opacity: 0; transform: translateX(28px) scale(.96); filter: blur(2px); }
    to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes activationPanelOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(28px) scale(.96); }
}

.activation-panel .activation-image {
    display: block;
    width: 92px;
    height: 92px;
    margin: 0 auto 5px;
    border-radius: 28px;
    object-fit: cover;
}

.login-container .activation-panel h1 {
    margin: 24px 0 12px;
}

.activation-panel .activation-image.is-google {
    object-fit: contain;
    border-radius: 0;
}

.activation-description {
    width: calc(100% + 40px);
    max-width: none;
    margin: 0 -20px 24px;
    color: #596579;
    font-size: 14px;
    line-height: 1.45;
}

.activation-description.is-institutional {
    max-width: none;
}

.activation-description.is-institutional span {
    display: block;
}

.activation-description.is-institutional span + span {
    margin-top: 10px;
}

.activation-feedback {
    max-width: 390px;
    margin: 0 auto 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff0ed;
    color: #852b24;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.activation-feedback.is-success {
    background: #eaf8f0;
    color: #19643a;
}

.activation-error-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: max-content;
    max-width: calc(100vw - 32px);
    padding: 14px 20px;
    border-radius: 18px;
    background: #dc4c4c;
    color: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.activation-step {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
}

#activation-code-step {
    max-width: 290px;
}

#activation-password-step {
    max-width: 290px;
}

#activation-password-step label {
    font-weight: 500;
    margin: 18px 0 12px;
}

#activation-code-step h2 {
    margin-bottom: 18px;
    font-size: 18px;
    font-weight: 600;
}

.activation-step.is-entering {
    animation: activationStepIn .32s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes activationStepIn {
    from { opacity: 0; transform: translateY(15px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.activation-step h2 {
    margin: 0 0 7px;
    color: #292d35;
    font-size: 19px;
}

.activation-step p {
    margin: 0 0 12px;
    color: #687387;
    font-size: 13px;
    line-height: 1.45;
}

.activation-step label {
    display: block;
    margin: 11px 0 6px;
    color: #343943;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
}

.activation-step input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 999px;
    background: rgba(245, 245, 245, .9);
    color: #333;
    font: inherit;
    font-size: 14px;
    text-align: center;
    outline: 0;
}

#activation-code {
    max-width: 205px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.activation-step input:focus-visible {
    border-color: var(--active-accent-color);
    box-shadow: 0 0 0 3px rgba(108, 87, 205, .24);
}

#activation-code,
#activation-code:focus,
#activation-code:focus-visible,
#activation-password,
#activation-password:focus,
#activation-password:focus-visible,
#activation-password-confirmation,
#activation-password-confirmation:focus,
#activation-password-confirmation:focus-visible {
    border: 1px solid rgba(0, 0, 0, .08);
    background-color: rgba(245, 245, 245, .8);
    outline: none;
    box-shadow: none;
}

.activation-panel button {
    margin-top: 14px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--active-accent-color);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.activation-panel button:disabled {
    opacity: .55;
    cursor: wait;
}

.activation-panel .activation-secondary {
    background: #edf0f6;
    color: #46546c;
}

.activation-panel .activation-text-action {
    padding: 0;
    margin-top: 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #687387;
    font-size: 13px;
    font-weight: 400;
}

.activation-text-action i {
    margin-right: 6px;
}

.activation-text-action:hover {
    text-decoration: underline;
}

.activation-cancel {
    background: #dc4c4c !important;
    color: #fff !important;
}

.activation-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.activation-actions button {
    margin-top: 0;
    min-height: 46px;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.activation-validate {
    background: #22a06b !important;
}

#activation-prepare-google {
    background: #2f91ff !important;
}

.activation-validate i {
    margin-right: 5px;
}

.activation-cancel-standalone {
    margin-top: 17px !important;
    font-size: 12px !important;
}

.activation-privacy-note {
    font-size: 12px !important;
}

#activation-google-button {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.activation-panel [hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .activation-actions button {
        padding: 12px 35px;
        font-size: 14px;
    }

    .login-container.activation-mode {
        width: min(420px, 92vw);
        padding: 25px 22px;
    }

    .activation-panel .activation-image {
        width: 82px;
        height: 82px;
    }

    .activation-description {
        font-size: 13px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .login-stage,
    .activation-panel,
    .activation-step {
        animation: none !important;
        transition: none !important;
    }
}
